• Home
  • Raw
  • Download

Lines Matching refs:dContext

163 static void test_encode(skiatest::Reporter* reporter, GrDirectContext* dContext, SkImage* image) {  in test_encode()  argument
175 assert_equal(reporter, dContext, image, nullptr, decoded.get()); in test_encode()
181 assert_equal(reporter, dContext, image, &ir, decoded.get()); in test_encode()
189 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
190 test_encode(reporter, dContext, create_gpu_image(dContext).get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
379 auto dContext = contextInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
389 [dContext] { return create_gpu_image(dContext, true, SkBudgeted::kYes); }, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
390 [dContext] { return create_gpu_image(dContext, false, SkBudgeted::kNo); }, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
408 if ((origProxy = sk_gpu_test::GetTextureImageProxy(image.get(), dContext))) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
414 auto texImage = image->makeTextureImage(dContext, mipmapped, budgeted); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
418 if (!image->isTextureBacked() || imageContext->priv().matches(dContext)) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
429 dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
433 dContext->priv().caps()->mipmapSupport()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
448 dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
461 dContext->flushAndSubmit(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
465 auto dContext = contextInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
472 [dContext] { return create_gpu_image(dContext); }, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
478 if (!(image = image->makeTextureImage(dContext))) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
487 assert_equal(reporter, dContext, image.get(), nullptr, rasterImage.get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
492 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
498 bool can = dContext->colorTypeSupportedAsImage(colorType); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
501 dContext, kSize, kSize, colorType, GrMipmapped::kNo, GrRenderable::kNo); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
504 img = SkImage::MakeFromTexture(dContext, mbet->texture(), kTopLeft_GrSurfaceOrigin, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
523 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
524 auto texImage = bmp.asImage()->makeTextureImage(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
532 if (!texImage->readPixels(dContext, unpremul.info(), unpremul.getPixels(), unpremul.rowBytes(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
549 if (!texImage->readPixels(dContext, premul.info(), premul.getPixels(), premul.rowBytes(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
656 static void image_test_read_pixels(GrDirectContext* dContext, skiatest::Reporter* reporter, in image_test_read_pixels() argument
672 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, 0, 0)); in image_test_read_pixels()
676 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, -w, 0)); in image_test_read_pixels()
677 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, 0, -h)); in image_test_read_pixels()
678 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, in image_test_read_pixels()
680 REPORTER_ASSERT(reporter, !image->readPixels(dContext, info, pixels, rowBytes, in image_test_read_pixels()
685 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, 0, 0)); in image_test_read_pixels()
690 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, in image_test_read_pixels()
696 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, -1, -1)); in image_test_read_pixels()
702 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, pixels, rowBytes, in image_test_read_pixels()
724 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
725 image_test_read_pixels(dContext, reporter, create_gpu_image(dContext).get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
728 static void check_legacy_bitmap(skiatest::Reporter* reporter, GrDirectContext* dContext, in check_legacy_bitmap() argument
740 REPORTER_ASSERT(reporter, image->readPixels(dContext, info, &imageColor, sizeof(SkPMColor), in check_legacy_bitmap()
745 static void test_legacy_bitmap(skiatest::Reporter* reporter, GrDirectContext* dContext, in test_legacy_bitmap() argument
753 check_legacy_bitmap(reporter, dContext, image, bitmap); in test_legacy_bitmap()
783 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
784 sk_sp<SkImage> image(create_gpu_image(dContext)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
785 test_legacy_bitmap(reporter, dContext, image.get()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
840 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local
842 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(dContext, in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
857 dContext, in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS()
891 auto dContext = ctxInfo.directContext(); in test_cross_context_image() local
892 if (!dContext) { in test_cross_context_image()
899 if (!dContext->priv().caps()->crossContextTextureSupport()) { in test_cross_context_image()
913 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
918 sk_sp<SkSurface> surface = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, info); in test_cross_context_image()
928 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
938 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
949 ContextInfo otherContextInfo = testFactory.getSharedContextInfo(dContext); in test_cross_context_image()
964 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
977 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
997 sk_sp<SkImage> refImg(imageMaker(dContext)); in test_cross_context_image()
1001 std::tie(view, std::ignore) = as_IB(refImg)->asView(dContext, GrMipmapped::kNo); in test_cross_context_image()
1011 std::tie(viewSecondRef, std::ignore) = as_IB(refImg)->asView(dContext, in test_cross_context_image()
1048 [&pixmap](GrDirectContext* dContext) { in DEF_GPUTEST() argument
1049 return SkImage::MakeCrossContextFromPixmap(dContext, pixmap, false); in DEF_GPUTEST()
1063 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST() local
1064 if (!dContext || !dContext->priv().caps()->crossContextTextureSupport()) { in DEF_GPUTEST()
1068 sk_sp<SkImage> image = SkImage::MakeCrossContextFromPixmap(dContext, pixmap, false); in DEF_GPUTEST()
1071 auto [view, viewCT] = as_IB(image)->asView(dContext, GrMipmapped::kNo); in DEF_GPUTEST()
1155 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
1164 dContext->abandonContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
1399 static sk_sp<SkImage> make_yuva_image(GrDirectContext* dContext) { in make_yuva_image() argument
1409 return SkImage::MakeFromYUVAPixmaps(dContext, yuvaPixmaps); in make_yuva_image()
1413 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_ALL_CONTEXTS() local
1415 auto s = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kYes, ii, 1, nullptr); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1423 auto i2 = make_yuva_image(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1427 dContext->flushAndSubmit(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1429 [dContext, in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1430 submitCnt = dContext->priv().getGpu()->stats()->numSubmitToGpus()]() mutable { in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1431 int curr = dContext->priv().getGpu()->stats()->numSubmitToGpus(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1438 i0->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1439 i1->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1440 i2->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1444 i0->flush(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1445 dContext->submit(true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1447 i1->flush(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1448 dContext->submit(true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1450 i2->flush(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1451 dContext->submit(true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1457 i0->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1460 i1->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1463 i2->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1469 i0->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1472 i1->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1475 i2->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1480 i0->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1483 i1->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1486 i2->flushAndSubmit(dContext); in DEF_GPUTEST_FOR_ALL_CONTEXTS()