Lines Matching refs:dContext
40 void test_wrapping(GrDirectContext* dContext, in test_wrapping() argument
48 GrResourceCache* cache = dContext->priv().getResourceCache(); in test_wrapping()
52 sk_sp<ManagedBackendTexture> mbet = create(dContext, mipMapped, renderable); in test_wrapping()
75 if (dContext->backend() == GrBackend::kVulkan || dContext->backend() == GrBackend::kMetal) { in test_wrapping()
81 if (GrRenderable::kYes == renderable && dContext->colorTypeSupportedAsSurface(skColorType)) { in test_wrapping()
82 sk_sp<SkSurface> surf = SkSurface::MakeFromBackendTexture(dContext, in test_wrapping()
98 sk_sp<SkImage> img = SkImage::MakeFromTexture(dContext, in test_wrapping()
108 GrTextureProxy* proxy = sk_gpu_test::GetTextureImageProxy(img.get(), dContext); in test_wrapping()
242 static void check_base_readbacks(GrDirectContext* dContext, in check_base_readbacks() argument
272 proxy = dContext->priv().proxyProvider()->wrapRenderableBackendTexture( in check_base_readbacks()
275 proxy = dContext->priv().proxyProvider()->wrapBackendTexture( in check_base_readbacks()
282 auto swizzle = dContext->priv().caps()->getReadSwizzle(backendTex.getBackendFormat(), in check_base_readbacks()
286 auto surfaceContext = dContext->priv().makeSC(readView, info); in check_base_readbacks()
291 if (!surfaceContext->readPixels(dContext, actual, {0, 0})) { in check_base_readbacks()
308 void test_color_init(GrDirectContext* dContext, in test_color_init() argument
318 sk_sp<ManagedBackendTexture> mbet = create(dContext, color, mipmapped, renderable); in test_color_init()
329 check_mipmaps(dContext, mbet->texture(), colorType, expectedColors, reporter, in test_color_init()
334 check_base_readbacks(dContext, mbet->texture(), colorType, renderable, testColor, reporter, in test_color_init()
345 dContext->updateBackendTexture(mbet->texture(), in test_color_init()
356 static void check_mipmaps(GrDirectContext* dContext, in check_mipmaps() argument
364 if (GrBackendApi::kOpenGL == dContext->backend()) { in check_mipmaps()
365 GrGLGpu* glGPU = static_cast<GrGLGpu*>(dContext->priv().getGpu()); in check_mipmaps()
381 auto dstFillContext = dContext->priv().makeSFC(info); in check_mipmaps()
389 auto proxy = dContext->priv().proxyProvider()->wrapBackendTexture(backendTex, in check_mipmaps()
397 auto swizzle = dContext->priv().caps()->getReadSwizzle(backendTex.getBackendFormat(), in check_mipmaps()
423 bool result = dstFillContext->readPixels(dContext, actual, {0, 0}); in check_mipmaps()
465 static void test_pixmap_init(GrDirectContext* dContext, in test_pixmap_init() argument
490 sk_sp<ManagedBackendTexture> mbet = create(dContext, pixmaps, numMipLevels, origin, renderable); in test_pixmap_init()
513 check_mipmaps(dContext, mbet->texture(), grColorType, expectedColors, reporter, in test_pixmap_init()
518 check_base_readbacks(dContext, mbet->texture(), grColorType, renderable, colors[0], in test_pixmap_init()
535 dContext->updateBackendTexture(mbet->texture(), in test_pixmap_init()
629 auto uninitCreateMtd = [colorType](GrDirectContext* dContext, in color_type_backend_allocation_test()
632 auto mbet = ManagedBackendTexture::MakeWithoutData(dContext, in color_type_backend_allocation_test()
641 GrBackendFormat format = dContext->defaultBackendFormat(colorType, in color_type_backend_allocation_test()
655 auto createWithColorMtd = [colorType](GrDirectContext* dContext, in color_type_backend_allocation_test()
659 auto mbet = ManagedBackendTexture::MakeWithData(dContext, in color_type_backend_allocation_test()
670 GrBackendFormat format = dContext->defaultBackendFormat(colorType, in color_type_backend_allocation_test()
684 auto createWithSrcDataMtd = [](GrDirectContext* dContext, in color_type_backend_allocation_test()
690 auto mbet = ManagedBackendTexture::MakeWithData(dContext, in color_type_backend_allocation_test()
699 auto format = dContext->defaultBackendFormat(srcData[0].colorType(), in color_type_backend_allocation_test()
834 auto uninitCreateMtd = [format](GrDirectContext* dContext, in DEF_GPUTEST_FOR_ALL_GL_CONTEXTS()
837 return ManagedBackendTexture::MakeWithoutData(dContext, in DEF_GPUTEST_FOR_ALL_GL_CONTEXTS()
872 auto createWithColorMtd = [format, swizzle](GrDirectContext* dContext, in DEF_GPUTEST_FOR_ALL_GL_CONTEXTS()
877 return ManagedBackendTexture::MakeWithData(dContext, in DEF_GPUTEST_FOR_ALL_GL_CONTEXTS()
977 auto uninitCreateMtd = [format](GrDirectContext* dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
980 auto mbet = ManagedBackendTexture::MakeWithoutData(dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
1027 auto createWithColorMtd = [format, swizzle](GrDirectContext* dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
1032 auto mbet = ManagedBackendTexture::MakeWithData(dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT()