Lines Matching refs:dContext
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()
244 sk_sp<SkSurface> result = SkSurface::MakeFromBackendRenderTarget(dContext, backendRT, in make()
260 surface = sk_gpu_test::MakeBackendTextureSurface(dContext, in make()
272 surface = sk_gpu_test::MakeBackendRenderTargetSurface(dContext, in make()
298 sk_sp<GrVkSecondaryCBDrawContext> makeVkSCB(GrDirectContext* dContext) { in makeVkSCB() argument
299 const SkSurfaceCharacterization c = this->createCharacterization(dContext); in makeVkSCB()
311 return GrVkSecondaryCBDrawContext::Make(dContext, imageInfo, vkInfo, &fSurfaceProps); in makeVkSCB()
381 void DDLSurfaceCharacterizationTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) { in DDLSurfaceCharacterizationTestImpl() argument
392 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
393 if (dContext->backend() == GrBackendApi::kVulkan) { in DDLSurfaceCharacterizationTestImpl()
396 ddl = params.createDDL(dContext); in DDLSurfaceCharacterizationTestImpl()
400 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
408 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
413 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
418 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
425 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
430 const SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
432 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
434 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in DDLSurfaceCharacterizationTestImpl()
436 dContext->setResourceCacheLimit(maxResourceBytes/2); in DDLSurfaceCharacterizationTestImpl()
456 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
461 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
464 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
468 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
483 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
485 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
510 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
512 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
551 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
553 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
562 auto originalBackendFormat = dContext->defaultBackendFormat(kRGBA_8888_SkColorType, in DDLSurfaceCharacterizationTestImpl()
567 auto newBackendFormat = dContext->defaultBackendFormat(kRGB_565_SkColorType, in DDLSurfaceCharacterizationTestImpl()
585 if (dContext->backend() == GrBackendApi::kOpenGL) { in DDLSurfaceCharacterizationTestImpl()
586 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
591 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
692 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() local
694 SurfaceParameters params(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
696 SkSurfaceCharacterization characterization = params.createCharacterization(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
699 sk_sp<SkDeferredDisplayList> ddl = params.createDDL(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
702 sk_sp<GrVkSecondaryCBDrawContext> scbDrawContext = params.makeVkSCB(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
767 GrDirectContext* dContext, in test_make_render_target() argument
770 const SkSurfaceCharacterization c = params.createCharacterization(dContext); in test_make_render_target()
773 sk_sp<SkSurface> tmp = params.make(dContext); in test_make_render_target()
780 const SkSurfaceCharacterization c = params.createCharacterization(dContext); in test_make_render_target()
782 sk_sp<SkSurface> s = params.make(dContext); in test_make_render_target()
800 sk_sp<SkSurface> s = SkSurface::MakeRenderTarget(dContext, c, SkBudgeted::kYes); in test_make_render_target()
810 void DDLMakeRenderTargetTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) { in DDLMakeRenderTargetTestImpl() argument
817 SurfaceParameters params(dContext); in DDLMakeRenderTargetTestImpl()
822 test_make_render_target(reporter, dContext, params); in DDLMakeRenderTargetTestImpl()
847 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
849 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
860 SurfaceParameters params(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
862 sk_sp<SkSurface> s = params.make(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
897 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
901 sk_sp<SkSurface> s = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, ii); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
923 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
924 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
925 auto proxy = dContext->threadSafeProxy().get(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
949 GrBackendFormat goodBackendFormat = dContext->defaultBackendFormat(kRGBA_8888_SkColorType, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
995 if (dContext->backend() == GrBackendApi::kVulkan) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()