/third_party/skia/tests/ |
D | GrFinishedFlushTest.cpp | 24 static void busy_wait_for_callback(int* count, int expectedValue, GrDirectContext* dContext, in busy_wait_for_callback() argument 30 dContext->checkAsyncWorkCompletion(); in busy_wait_for_callback() 40 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 44 sk_sp<SkSurface> surface = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, info); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 50 dContext->flush(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 51 dContext->submit(true); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 60 dContext->submit(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 63 busy_wait_for_callback(&count, 1, dContext, reporter); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 68 dContext->submit(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 70 bool fenceSupport = dContext->priv().caps()->fenceSyncSupport(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | ClearTest.cpp | 37 static bool check_rect(GrDirectContext* dContext, in check_rect() argument 53 if (!sdc->readPixels(dContext, readback, {rect.fLeft, rect.fTop})) { in check_rect() 76 static void clear_op_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in clear_op_test() argument 107 sdc = newSDC(dContext, kW, kH); in clear_op_test() 112 if (!check_rect(dContext, sdc.get(), fullRect, kColor1, &actualValue, &failX, &failY)) { in clear_op_test() 117 sdc = newSDC(dContext, kW, kH); in clear_op_test() 123 if (!check_rect(dContext, sdc.get(), fullRect, kColor1, &actualValue, &failX, &failY)) { in clear_op_test() 128 sdc = newSDC(dContext, kW, kH); in clear_op_test() 134 if (!check_rect(dContext, sdc.get(), fullRect, kColor2, &actualValue, &failX, &failY)) { in clear_op_test() 139 sdc = newSDC(dContext, kW, kH); in clear_op_test() [all …]
|
D | CompressedBackendAllocationTest.cpp | 40 sk_sp<SkImage> create_image(GrDirectContext* dContext, const GrBackendTexture& backendTex) { in create_image() argument 47 return SkImage::MakeFromCompressedTexture(dContext, in create_image() 113 static void check_readback(GrDirectContext* dContext, sk_sp<SkImage> img, in check_readback() argument 119 if (dContext->backend() == GrBackendApi::kMetal) { in check_readback() 133 bool result = img->readPixels(dContext, actual, 0, 0); in check_readback() 141 static void test_compressed_color_init(GrDirectContext* dContext, in test_compressed_color_init() argument 149 GrBackendTexture backendTex = create(dContext, color, mipMapped); in test_compressed_color_init() 154 sk_sp<SkImage> img = create_image(dContext, backendTex); in test_compressed_color_init() 161 check_compressed_mipmaps(dContext, img, compression, expectedColors, mipMapped, in test_compressed_color_init() 163 check_readback(dContext, img, compression, color, reporter, "solid readback"); in test_compressed_color_init() [all …]
|
D | TextureBindingsResetTest.cpp | 21 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local 22 GrGpu* gpu = dContext->priv().getGpu(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 23 GrGLGpu* glGpu = static_cast<GrGLGpu*>(dContext->priv().getGpu()); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 72 dContext->flushAndSubmit(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 74 dContext->resetContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 83 dContext->resetGLTextureBindings(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 86 dContext->resetContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 91 auto surf = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kYes, info, 1, nullptr); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 100 dContext->resetGLTextureBindings(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 103 dContext->resetContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() [all …]
|
D | TraceMemoryDumpTest.cpp | 59 void ValidateMemoryDumps(skiatest::Reporter* reporter, GrDirectContext* dContext, in ValidateMemoryDumps() argument 63 dContext->dumpMemoryStatistics(&dump_with_wrapped); in ValidateMemoryDumps() 68 dContext->dumpMemoryStatistics(&dump_no_wrapped); in ValidateMemoryDumps() 80 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local 81 GrGLGpu* gpu = static_cast<GrGLGpu*>(dContext->priv().getGpu()); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 86 ValidateMemoryDumps(reporter, dContext, 2, kMemorySize, true /* isOwned */); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 90 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local 91 GrGLGpu* gpu = static_cast<GrGLGpu*>(dContext->priv().getGpu()); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 103 ValidateMemoryDumps(reporter, dContext, 2, texture->gpuMemorySize(), true /* isOwned */); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 107 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local [all …]
|
D | GrDDLImageTest.cpp | 18 auto dContext = factory.get(contextType); in DEF_GPUTEST() local 19 if (!dContext) { in DEF_GPUTEST() 35 auto subImg1 = rasterImg->makeSubset(subsetBounds, dContext); in DEF_GPUTEST() 36 REPORTER_ASSERT(reporter, subImg1->isValid(dContext)); in DEF_GPUTEST() 43 auto surf = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, ii); in DEF_GPUTEST() 47 dContext->createBackendTexture(ii.width(), ii.height(), ii.colorType(), in DEF_GPUTEST() 49 auto gpuImage = SkImage::MakeFromTexture(dContext, tex, kTopLeft_GrSurfaceOrigin, in DEF_GPUTEST() 52 REPORTER_ASSERT(reporter, gpuImage->isValid(dContext)); in DEF_GPUTEST() 55 auto subImg5 = gpuImage->makeSubset(subsetBounds, dContext); in DEF_GPUTEST() 56 REPORTER_ASSERT(reporter, subImg5->isValid(dContext)); in DEF_GPUTEST() [all …]
|
D | RectangleTextureTest.cpp | 25 static void test_basic_draw_as_src(skiatest::Reporter* reporter, GrDirectContext* dContext, in test_basic_draw_as_src() argument 28 auto sfc = dContext->priv().makeSFC( in test_basic_draw_as_src() 35 TestReadPixels(reporter, dContext, sfc.get(), expectedPixelValues, in test_basic_draw_as_src() 41 static void test_clear(skiatest::Reporter* reporter, GrDirectContext* dContext, in test_clear() argument 82 TestReadPixels(reporter, dContext, sfc, expectedPixels.get(), "RectangleTexture-clear"); in test_clear() 87 GrDirectContext* dContext, in test_copy_to_surface() argument 107 auto srcView = sk_gpu_test::MakeTextureProxyViewFromData(dContext, in test_copy_to_surface() 114 TestReadPixels(reporter, dContext, dstContext, pixels.get(), testName); in test_copy_to_surface() 120 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local 122 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() [all …]
|
D | TextureProxyTest.cpp | 100 static sk_sp<GrTextureProxy> create_wrapped_backend(GrDirectContext* dContext) { in create_wrapped_backend() argument 102 dContext, in create_wrapped_backend() 112 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in create_wrapped_backend() 122 static void basic_test(GrDirectContext* dContext, in basic_test() argument 128 GrResourceProvider* resourceProvider = dContext->priv().resourceProvider(); in basic_test() 129 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in basic_test() 130 GrResourceCache* cache = dContext->priv().getResourceCache(); in basic_test() 205 GrUniqueKeyInvalidatedMessage msg(texKey, dContext->priv().contextID()); in basic_test() 219 static void invalidation_test(GrDirectContext* dContext, in invalidation_test() argument 223 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in invalidation_test() [all …]
|
D | DeferredDisplayListTest.cpp | 183 SkSurfaceCharacterization createCharacterization(GrDirectContext* dContext) const { in createCharacterization() 184 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in createCharacterization() 186 if (!dContext->colorTypeSupportedAsSurface(fColorType)) { in createCharacterization() 194 GrBackendFormat backendFormat = dContext->defaultBackendFormat(fColorType, in createCharacterization() 200 SkSurfaceCharacterization c = dContext->threadSafeProxy()->createCharacterization( in createCharacterization() 210 sk_sp<SkDeferredDisplayList> createDDL(GrDirectContext* dContext) const { in createDDL() 211 SkSurfaceCharacterization c = this->createCharacterization(dContext); in createDDL() 225 sk_sp<SkSurface> make(GrDirectContext* dContext) const { in make() 226 const SkSurfaceCharacterization c = this->createCharacterization(dContext); in make() 230 if (GrBackendApi::kOpenGL != dContext->backend()) { in make() [all …]
|
D | GrMipMappedTest.cpp | 44 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 45 if (!dContext->priv().caps()->mipmapSupport()) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 54 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithData(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 71 dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 84 image = SkImage::MakeFromTexture(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 93 proxy = sk_ref_sp(sk_gpu_test::GetTextureImageProxy(image.get(), dContext)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 125 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 126 if (!dContext->priv().caps()->mipmapSupport()) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 135 dContext, ii, SkColors::kTransparent, betMipmapped); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 138 GrTextureProxy* proxy = sk_gpu_test::GetTextureImageProxy(image.get(), dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | ImageTest.cpp | 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() [all …]
|
D | BackendAllocationTest.cpp | 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() [all …]
|
D | BulkRectTest.cpp | 49 static void fillrectop_creation_test(skiatest::Reporter* reporter, GrDirectContext* dContext, in fillrectop_creation_test() argument 59 std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext); in fillrectop_creation_test() 73 skgpu::v1::FillRectOp::AddFillRectOps(sdc.get(), nullptr, dContext, std::move(paint), overallAA, in fillrectop_creation_test() 91 dContext->flushAndSubmit(); in fillrectop_creation_test() 97 static void textureop_creation_test(skiatest::Reporter* reporter, GrDirectContext* dContext, in textureop_creation_test() argument 103 std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext); in textureop_creation_test() 108 sk_sp<GrSurfaceProxy> proxyA = create_proxy(dContext); in textureop_creation_test() 109 sk_sp<GrSurfaceProxy> proxyB = create_proxy(dContext); in textureop_creation_test() 127 sk_sp<GrSurfaceProxy> proxyA = create_proxy(dContext); in textureop_creation_test() 150 GrOp::Owner op = skgpu::v1::TextureOp::Make(dContext, in textureop_creation_test() [all …]
|
D | TextureOpTest.cpp | 52 static GrOp::Owner create_op(GrDirectContext* dContext, SkRect rect, in create_op() argument 60 return skgpu::v1::TextureOp::Make(dContext, in create_op() 78 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 79 const GrCaps* caps = dContext->priv().caps(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 81 auto auditTrail = dContext->priv().auditTrail(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 88 GrSurfaceProxyView proxyViewA(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 91 GrSurfaceProxyView proxyViewB(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 94 GrSurfaceProxyView proxyViewC(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 104 GrOp::Owner opA = create_op(dContext, kOpARect, proxyViewA, false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 105 GrOp::Owner opB = create_op(dContext, kOpBRect, proxyViewB, false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | WrappedSurfaceCopyOnWriteTest.cpp | 24 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_ALL_CONTEXTS() local 28 return sk_gpu_test::MakeBackendTextureSurface(dContext, in DEF_GPUTEST_FOR_ALL_CONTEXTS() 35 return sk_gpu_test::GetTextureImageProxy(img.get(), dContext)->uniqueID(); in DEF_GPUTEST_FOR_ALL_CONTEXTS() 83 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 90 auto dstSC = CreateSurfaceContext(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 97 auto srcSC = CreateSurfaceContext(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 105 dContext->priv().drawingManager()->newCopyRenderTask(srcSC->asSurfaceProxyRef(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 120 dstSC->readPixels(dContext, pixels, {0, 0}); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 134 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 138 auto dst = dContext->priv().makeSFC(ii, SkBackingFit::kExact); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | VkBackendSurfaceTest.cpp | 34 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() local 36 const GrVkCaps* vkCaps = static_cast<const GrVkCaps*>(dContext->priv().caps()); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 43 dContext, 1, 1, kRGBA_8888_SkColorType, GrMipmapped::kNo, GrRenderable::kNo); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 63 sk_sp<SkImage> drmImage = SkImage::MakeFromTexture(dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 74 auto[view, _] = as_IB(drmImage.get()) -> asView(dContext, GrMipmapped::kNo); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 89 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() local 92 dContext, 1, 1, kRGBA_8888_SkColorType, GrMipmapped::kNo, GrRenderable::kNo); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 121 dContext, in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 131 GrSurfaceProxy* proxy = sk_gpu_test::GetTextureImageProxy(wrappedImage.get(), dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() 192 auto dContext = ctxInfo.directContext(); [all …]
|
D | GrSurfaceTest.cpp | 206 auto dContext = factory.get(contextType); in DEF_GPUTEST() local 207 if (!dContext) { in DEF_GPUTEST() 211 GrProxyProvider* proxyProvider = dContext->priv().proxyProvider(); in DEF_GPUTEST() 212 const GrCaps* caps = dContext->priv().caps(); in DEF_GPUTEST() 272 auto texCtx = dContext->priv().makeSC(std::move(view), info); in DEF_GPUTEST() 275 if (texCtx->readPixels(dContext, readback, {0, 0})) { in DEF_GPUTEST() 284 dContext->priv().getResourceCache()->purgeUnlockedResources(); in DEF_GPUTEST() 296 auto sc = dContext->priv().makeSC(info, in DEF_GPUTEST() 306 if (sc->readPixels(dContext, readback, {0, 0})) { in DEF_GPUTEST() 313 dContext->priv().getResourceCache()->purgeUnlockedResources(); in DEF_GPUTEST() [all …]
|
D | GrThreadSafeCacheTest.cpp | 116 TestHelper(GrDirectContext* dContext, in TestHelper() argument 118 : fDContext(dContext) in TestHelper() 121 fDst = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, default_ii(kImageWH)); in TestHelper() 145 GrDirectContext* dContext() { return fDContext; } in dContext() function in TestHelper 537 if (auto dContext = rContext->asDirectContext(); dContext && !fVertexData->gpuBuffer()) { in findOrCreateVertices() local 538 auto rp = dContext->priv().resourceProvider(); in findOrCreateVertices() 578 auto dContext = flushState->gpu()->getContext(); in onPrepare() local 582 this->findOrCreateVertices(dContext, false, fFailFillingIn); in onPrepare() 648 bool TestHelper::FillInViewOnGpu(GrDirectContext* dContext, int wh, Stats* stats, in FillInViewOnGpu() argument 652 std::unique_ptr<skgpu::v1::SurfaceDrawContext> sdc = new_SDC(dContext, wh); in FillInViewOnGpu() [all …]
|
/third_party/skia/fuzz/ |
D | FuzzCreateDDL.cpp | 124 static SkSurfaceCharacterization make_characterization(Fuzz* fuzz, GrDirectContext* dContext, in make_characterization() argument 127 if (!dContext->colorTypeSupportedAsSurface(surfaceType)) { in make_characterization() 129 GrBackendApiToStr(dContext->backend())); in make_characterization() 133 GrBackendFormat backendFormat = dContext->defaultBackendFormat(surfaceType, in make_characterization() 137 GrBackendApiToStr(dContext->backend())); in make_characterization() 145 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in make_characterization() 146 c = dContext->threadSafeProxy()->createCharacterization( in make_characterization() 152 GrBackendApiToStr(dContext->backend())); in make_characterization() 158 static sk_sp<SkDeferredDisplayList> make_ddl(Fuzz* fuzz, GrDirectContext* dContext, in make_ddl() argument 163 SkDebugf("Could not create canvas for backend %s", GrBackendApiToStr(dContext->backend())); in make_ddl() [all …]
|
/third_party/skia/docs/examples/ |
D | Image_makeTextureImage.cpp | 7 auto dContext = GrAsDirectContext(canvas->recordingContext()); in draw() local 8 if (!dContext) { in draw() 13 GrDirectContext* dContext, in draw() 15 if (nullptr == image || nullptr == dContext) { in draw() 24 sk_sp<SkImage> texture(image->makeTextureImage(dContext)); in draw() 31 sk_sp<SkImage> textureImage(SkImage::MakeFromTexture(dContext, backEndTexture, in draw() 35 drawImage(image, dContext, "image"); in draw() 37 drawImage(bitmapImage, dContext, "source"); in draw() 39 drawImage(textureImage, dContext, "backEndTexture"); in draw()
|
/third_party/skia/tools/gpu/ |
D | BackendSurfaceFactory.cpp | 18 sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext* dContext, in MakeBackendTextureSurface() argument 28 auto mbet = ManagedBackendTexture::MakeWithoutData(dContext, in MakeBackendTextureSurface() 38 return SkSurface::MakeFromBackendTexture(dContext, in MakeBackendTextureSurface() 49 sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext* dContext, in MakeBackendTextureSurface() argument 60 dContext, ii, origin, sampleCnt, mipMapped, isProtected, props); in MakeBackendTextureSurface() 62 sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext* dContext, in MakeBackendRenderTargetSurface() argument 78 auto bert = dContext->priv().getGpu()->createTestingOnlyBackendRenderTarget( in MakeBackendRenderTargetSurface() 80 auto rc = new ReleaseContext{sk_ref_sp(dContext), bert}; in MakeBackendRenderTargetSurface() 92 dContext, bert, origin, ii.colorType(), ii.refColorSpace(), props, proc, rc); in MakeBackendRenderTargetSurface() 95 sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext* dContext, in MakeBackendRenderTargetSurface() argument [all …]
|
/third_party/skia/src/image/ |
D | SkImage_Gpu.cpp | 163 SkImage_Gpu::SkImage_Gpu(sk_sp<GrDirectContext> dContext, in SkImage_Gpu() argument 169 : INHERITED(std::move(dContext), in SkImage_Gpu() 233 GrSemaphoresSubmitted SkImage_Gpu::onFlush(GrDirectContext* dContext, in onFlush() argument 235 if (!fContext->priv().matches(dContext) || dContext->abandoned()) { in onFlush() 245 sk_sp<GrSurfaceProxy> proxy = fChooser.chooseProxy(dContext); in onFlush() 246 return dContext->priv().flushSurface(proxy.get(), in onFlush() 291 GrDirectContext* dContext) const { in onMakeColorTypeAndColorSpace() 293 if (!fContext->priv().matches(dContext)) { in onMakeColorTypeAndColorSpace() 297 auto sfc = dContext->priv().makeSFCWithFallback(GrImageInfo(info, this->dimensions()), in onMakeColorTypeAndColorSpace() 307 auto [view, _] = this->asView(dContext, GrMipmapped(this->hasMipmaps())); in onMakeColorTypeAndColorSpace() [all …]
|
/third_party/skia/src/gpu/ |
D | GrAHardwareBufferUtils.cpp | 63 GrBackendFormat GetBackendFormat(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, in GetBackendFormat() argument 65 GrBackendApi backend = dContext->backend(); in GetBackendFormat() 107 GrVkGpu* gpu = static_cast<GrVkGpu*>(dContext->priv().getGpu()); in GetBackendFormat() 181 void GLTextureHelper::rebind(GrDirectContext* dContext) { in rebind() argument 194 dContext->resetContext(kTextureBinding_GrGLBackendState); in rebind() 202 void update_gl_texture(void* context, GrDirectContext* dContext) { in update_gl_texture() argument 204 cleanupHelper->rebind(dContext); in update_gl_texture() 208 GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, in make_gl_backend_texture() argument 256 dContext->resetContext(kTextureBinding_GrGLBackendState); in make_gl_backend_texture() 297 void update_vk_image(void* context, GrDirectContext* dContext) { in update_vk_image() argument [all …]
|
/third_party/skia/gm/ |
D | ycbcrimage.cpp | 45 DrawResult createYCbCrImage(GrDirectContext* dContext, SkString* errorMsg) { in createYCbCrImage() argument 46 std::unique_ptr<VkYcbcrSamplerHelper> ycbcrHelper(new VkYcbcrSamplerHelper(dContext)); in createYCbCrImage() 59 fYCbCrImage = SkImage::MakeFromTexture(dContext, ycbcrHelper->backendTexture(), in createYCbCrImage() 72 DrawResult onGpuSetup(GrDirectContext* dContext, SkString* errorMsg) override { in onGpuSetup() argument 73 if (!dContext || dContext->abandoned()) { in onGpuSetup() 77 if (dContext->backend() != GrBackendApi::kVulkan) { in onGpuSetup() 82 DrawResult result = this->createYCbCrImage(dContext, errorMsg); in onGpuSetup()
|
/third_party/skia/src/gpu/gl/ |
D | GrGLGpuProgramCache.cpp | 51 sk_sp<GrGLProgram> GrGLGpu::ProgramCache::findOrCreateProgram(GrDirectContext* dContext, in findOrCreateProgram() argument 53 const GrCaps* caps = dContext->priv().caps(); in findOrCreateProgram() 62 sk_sp<GrGLProgram> tmp = this->findOrCreateProgramImpl(dContext, desc, programInfo, &stat); in findOrCreateProgram() 72 sk_sp<GrGLProgram> GrGLGpu::ProgramCache::findOrCreateProgram(GrDirectContext* dContext, in findOrCreateProgram() argument 76 sk_sp<GrGLProgram> tmp = this->findOrCreateProgramImpl(dContext, desc, programInfo, stat); in findOrCreateProgram() 86 sk_sp<GrGLProgram> GrGLGpu::ProgramCache::findOrCreateProgramImpl(GrDirectContext* dContext, in findOrCreateProgramImpl() argument 96 (*entry)->fProgram = GrGLProgramBuilder::CreateProgram(dContext, desc, programInfo, in findOrCreateProgramImpl() 108 sk_sp<GrGLProgram> program = GrGLProgramBuilder::CreateProgram(dContext, desc, programInfo); in findOrCreateProgramImpl() 121 bool GrGLGpu::ProgramCache::precompileShader(GrDirectContext* dContext, in precompileShader() argument 136 if (!GrGLProgramBuilder::PrecompileProgram(dContext, &precompiledProgram, data)) { in precompileShader()
|