/external/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 | 34 static bool check_rect(GrDirectContext* dContext, GrSurfaceDrawContext* rtc, const SkIRect& rect, in check_rect() argument 45 if (!rtc->readPixels(dContext, readback, {rect.fLeft, rect.fTop})) { in check_rect() 69 static void clear_op_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in clear_op_test() argument 100 rtContext = newRTC(dContext, kW, kH); in clear_op_test() 105 if (!check_rect(dContext, rtContext.get(), fullRect, kColor1, &actualValue, &failX, &failY)) { in clear_op_test() 110 rtContext = newRTC(dContext, kW, kH); in clear_op_test() 116 if (!check_rect(dContext, rtContext.get(), fullRect, kColor1, &actualValue, &failX, &failY)) { in clear_op_test() 121 rtContext = newRTC(dContext, kW, kH); in clear_op_test() 127 if (!check_rect(dContext, rtContext.get(), fullRect, kColor2, &actualValue, &failX, &failY)) { in clear_op_test() 132 rtContext = newRTC(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() 82 dContext->resetGLTextureBindings(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 85 dContext->resetContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 90 auto surf = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kYes, info, 1, nullptr); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 99 dContext->resetGLTextureBindings(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() 102 dContext->resetContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() [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 | 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 | RectangleTextureTest.cpp | 24 static void test_basic_draw_as_src(skiatest::Reporter* reporter, GrDirectContext* dContext, in test_basic_draw_as_src() argument 28 dContext, {colorType, kPremul_SkAlphaType, nullptr, rectView.dimensions()}); in test_basic_draw_as_src() 34 TestReadPixels(reporter, dContext, fillContext.get(), expectedPixelValues, in test_basic_draw_as_src() 40 static void test_clear(skiatest::Reporter* reporter, GrDirectContext* dContext, in test_clear() argument 81 TestReadPixels(reporter, dContext, sfc, expectedPixels.get(), "RectangleTexture-clear"); in test_clear() 86 GrDirectContext* dContext, in test_copy_to_surface() argument 106 auto srcView = sk_gpu_test::MakeTextureProxyViewFromData(dContext, in test_copy_to_surface() 113 TestReadPixels(reporter, dContext, dstContext, pixels.get(), testName); in test_copy_to_surface() 119 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS() local 121 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 | 185 SkSurfaceCharacterization createCharacterization(GrDirectContext* dContext) const { in createCharacterization() 186 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in createCharacterization() 188 if (!dContext->colorTypeSupportedAsSurface(fColorType)) { in createCharacterization() 196 GrBackendFormat backendFormat = dContext->defaultBackendFormat(fColorType, in createCharacterization() 202 SkSurfaceCharacterization c = dContext->threadSafeProxy()->createCharacterization( in createCharacterization() 212 sk_sp<SkDeferredDisplayList> createDDL(GrDirectContext* dContext) const { in createDDL() 213 SkSurfaceCharacterization c = this->createCharacterization(dContext); in createDDL() 227 sk_sp<SkSurface> make(GrDirectContext* dContext) const { in make() 228 const SkSurfaceCharacterization c = this->createCharacterization(dContext); in make() 232 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 | TextureOpTest.cpp | 50 static GrOp::Owner create_op(GrDirectContext* dContext, SkRect rect, in create_op() argument 58 return GrTextureOp::Make(dContext, in create_op() 76 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 77 const GrCaps* caps = dContext->priv().caps(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 79 auto auditTrail = dContext->priv().auditTrail(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 86 GrSurfaceProxyView proxyViewA(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 89 GrSurfaceProxyView proxyViewB(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 92 GrSurfaceProxyView proxyViewC(create_proxy(dContext), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 102 GrOp::Owner opA = create_op(dContext, kOpARect, proxyViewA, false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 103 GrOp::Owner opB = create_op(dContext, kOpBRect, proxyViewB, false); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all …]
|
D | BulkRectTest.cpp | 47 static void fillrectop_creation_test(skiatest::Reporter* reporter, GrDirectContext* dContext, in fillrectop_creation_test() argument 57 std::unique_ptr<GrSurfaceDrawContext> rtc = new_RTC(dContext); in fillrectop_creation_test() 71 GrFillRectOp::AddFillRectOps(rtc.get(), nullptr, dContext, std::move(paint), overallAA, in fillrectop_creation_test() 89 dContext->flushAndSubmit(); in fillrectop_creation_test() 95 static void textureop_creation_test(skiatest::Reporter* reporter, GrDirectContext* dContext, in textureop_creation_test() argument 101 std::unique_ptr<GrSurfaceDrawContext> rtc = new_RTC(dContext); in textureop_creation_test() 106 sk_sp<GrSurfaceProxy> proxyA = create_proxy(dContext); in textureop_creation_test() 107 sk_sp<GrSurfaceProxy> proxyB = create_proxy(dContext); in textureop_creation_test() 125 sk_sp<GrSurfaceProxy> proxyA = create_proxy(dContext); in textureop_creation_test() 148 GrOp::Owner op = GrTextureOp::Make(dContext, in textureop_creation_test() [all …]
|
D | BackendAllocationTest.cpp | 39 void test_wrapping(GrDirectContext* dContext, in test_wrapping() argument 47 GrResourceCache* cache = dContext->priv().getResourceCache(); in test_wrapping() 51 sk_sp<ManagedBackendTexture> mbet = create(dContext, mipMapped, renderable); in test_wrapping() 74 if (dContext->backend() == GrBackend::kVulkan) { in test_wrapping() 80 if (GrRenderable::kYes == renderable && dContext->colorTypeSupportedAsSurface(skColorType)) { in test_wrapping() 81 sk_sp<SkSurface> surf = SkSurface::MakeFromBackendTexture(dContext, in test_wrapping() 97 sk_sp<SkImage> img = SkImage::MakeFromTexture(dContext, in test_wrapping() 107 GrTextureProxy* proxy = sk_gpu_test::GetTextureImageProxy(img.get(), dContext); in test_wrapping() 241 static void check_base_readbacks(GrDirectContext* dContext, in check_base_readbacks() argument 271 proxy = dContext->priv().proxyProvider()->wrapRenderableBackendTexture( in check_base_readbacks() [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 85 auto dst = GrSurfaceDrawContext::Make(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 93 auto src = GrSurfaceDrawContext::Make(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 102 dContext->priv().drawingManager()->newCopyRenderTask(src->asSurfaceProxyRef(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 117 dst->readPixels(dContext, pixels, {0, 0}); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 129 GrDirectContext* dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 131 auto dst = GrSurfaceDrawContext::Make(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [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 = GrSurfaceContext::Make(dContext, 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() 292 dContext, combo.fColorType, nullptr, fit, in DEF_GPUTEST() 300 surfCtx = GrSurfaceContext::Make(dContext, info, combo.fFormat, fit); in DEF_GPUTEST() 307 if (surfCtx->readPixels(dContext, readback, {0, 0})) { in DEF_GPUTEST() [all …]
|
D | VkWrapTests.cpp | 34 void wrap_tex_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in wrap_tex_test() argument 35 GrGpu* gpu = dContext->priv().getGpu(); in wrap_tex_test() 38 dContext, kW, kH, kRGBA_8888_SkColorType, GrMipmapped::kNo, GrRenderable::kNo); in wrap_tex_test() 95 void wrap_rt_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in wrap_rt_test() argument 96 GrGpu* gpu = dContext->priv().getGpu(); in wrap_rt_test() 140 void wrap_trt_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in wrap_trt_test() argument 141 GrGpu* gpu = dContext->priv().getGpu(); in wrap_trt_test() 144 dContext, kW, kH, kRGBA_8888_SkColorType, GrMipmapped::kNo, GrRenderable::kYes); in wrap_trt_test() 186 int maxSamples = dContext->priv().caps()->maxRenderTargetSampleCount( in wrap_trt_test() 208 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() local [all …]
|
D | GrThreadSafeCacheTest.cpp | 113 TestHelper(GrDirectContext* dContext, in TestHelper() argument 115 : fDContext(dContext) in TestHelper() 118 fDst = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, default_ii(kImageWH)); in TestHelper() 142 GrDirectContext* dContext() { return fDContext; } in dContext() function in TestHelper 532 if (auto dContext = rContext->asDirectContext(); dContext && !fVertexData->gpuBuffer()) { in findOrCreateVertices() local 533 auto rp = dContext->priv().resourceProvider(); in findOrCreateVertices() 570 auto dContext = flushState->gpu()->getContext(); in onPrepare() local 574 this->findOrCreateVertices(dContext, false, fFailFillingIn); in onPrepare() 640 bool TestHelper::FillInViewOnGpu(GrDirectContext* dContext, int wh, Stats* stats, in FillInViewOnGpu() argument 644 std::unique_ptr<GrSurfaceDrawContext> rtc = new_RTC(dContext, wh); in FillInViewOnGpu() [all …]
|
/external/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 …]
|
/external/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()
|
/external/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 …]
|
/external/skia/src/image/ |
D | SkImage_Gpu.cpp | 162 SkImage_Gpu::SkImage_Gpu(sk_sp<GrDirectContext> dContext, in SkImage_Gpu() argument 168 : INHERITED(std::move(dContext), in SkImage_Gpu() 232 GrSemaphoresSubmitted SkImage_Gpu::onFlush(GrDirectContext* dContext, const GrFlushInfo& info) { in onFlush() argument 233 if (!fContext->priv().matches(dContext) || dContext->abandoned()) { in onFlush() 243 sk_sp<GrSurfaceProxy> proxy = fChooser.chooseProxy(dContext); in onFlush() 244 return dContext->priv().flushSurface(proxy.get(), in onFlush() 336 auto dContext = fContext->asDirectContext(); in onAsyncRescaleAndReadPixels() local 337 if (!dContext) { in onAsyncRescaleAndReadPixels() 342 auto ctx = GrSurfaceContext::Make(dContext, in onAsyncRescaleAndReadPixels() 343 this->makeView(dContext), in onAsyncRescaleAndReadPixels() [all …]
|
/external/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 …]
|
D | GrBackendTextureImageGenerator.cpp | 48 GrDirectContext* dContext = texture->getContext(); in Make() local 53 dContext->priv().getResourceCache()->insertDelayedTextureUnref(texture.get()); in Make() 57 if (!dContext->priv().caps()->areColorTypeAndFormatCompatible( in Make() 65 info, texture.get(), origin, dContext->directContextID(), in Make() 108 auto dContext = rContext->asDirectContext(); in onGenerateTexture() local 109 if (!dContext) { in onGenerateTexture() 113 if (dContext->backend() != fBackendTexture.backend()) { in onGenerateTexture() 120 auto proxyProvider = dContext->priv().proxyProvider(); in onGenerateTexture() 125 if (fRefHelper->fBorrowingContextID != dContext->directContextID()) { in onGenerateTexture() 144 fRefHelper->fBorrowingContextID = dContext->directContextID(); in onGenerateTexture() [all …]
|
/external/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()
|