Lines Matching refs:dContext
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()
246 sk_sp<SkSurface> result = SkSurface::MakeFromBackendRenderTarget(dContext, backendRT, in make()
262 surface = sk_gpu_test::MakeBackendTextureSurface(dContext, in make()
274 surface = sk_gpu_test::MakeBackendRenderTargetSurface(dContext, in make()
300 sk_sp<GrVkSecondaryCBDrawContext> makeVkSCB(GrDirectContext* dContext) { in makeVkSCB() argument
301 const SkSurfaceCharacterization c = this->createCharacterization(dContext); in makeVkSCB()
313 return GrVkSecondaryCBDrawContext::Make(dContext, imageInfo, vkInfo, &fSurfaceProps); in makeVkSCB()
383 void DDLSurfaceCharacterizationTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) { in DDLSurfaceCharacterizationTestImpl() argument
394 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
395 if (dContext->backend() == GrBackendApi::kVulkan) { in DDLSurfaceCharacterizationTestImpl()
398 ddl = params.createDDL(dContext); in DDLSurfaceCharacterizationTestImpl()
402 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
410 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
415 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
420 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
427 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
432 const SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
434 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
436 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in DDLSurfaceCharacterizationTestImpl()
438 dContext->setResourceCacheLimit(maxResourceBytes/2); in DDLSurfaceCharacterizationTestImpl()
458 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
463 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
466 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
470 dContext->flush(); in DDLSurfaceCharacterizationTestImpl()
485 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
487 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
512 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
514 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
553 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
555 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
564 auto originalBackendFormat = dContext->defaultBackendFormat(kRGBA_8888_SkColorType, in DDLSurfaceCharacterizationTestImpl()
569 auto newBackendFormat = dContext->defaultBackendFormat(kRGB_565_SkColorType, in DDLSurfaceCharacterizationTestImpl()
587 if (dContext->backend() == GrBackendApi::kOpenGL) { in DDLSurfaceCharacterizationTestImpl()
588 SurfaceParameters params(dContext); in DDLSurfaceCharacterizationTestImpl()
593 sk_sp<SkSurface> s = params.make(dContext); in DDLSurfaceCharacterizationTestImpl()
694 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_VULKAN_CONTEXT() local
696 SurfaceParameters params(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
698 SkSurfaceCharacterization characterization = params.createCharacterization(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
701 sk_sp<SkDeferredDisplayList> ddl = params.createDDL(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
704 sk_sp<GrVkSecondaryCBDrawContext> scbDrawContext = params.makeVkSCB(dContext); in DEF_GPUTEST_FOR_VULKAN_CONTEXT()
769 GrDirectContext* dContext, in test_make_render_target() argument
772 const SkSurfaceCharacterization c = params.createCharacterization(dContext); in test_make_render_target()
775 sk_sp<SkSurface> tmp = params.make(dContext); in test_make_render_target()
782 const SkSurfaceCharacterization c = params.createCharacterization(dContext); in test_make_render_target()
784 sk_sp<SkSurface> s = params.make(dContext); in test_make_render_target()
802 sk_sp<SkSurface> s = SkSurface::MakeRenderTarget(dContext, c, SkBudgeted::kYes); in test_make_render_target()
812 void DDLMakeRenderTargetTestImpl(GrDirectContext* dContext, skiatest::Reporter* reporter) { in DDLMakeRenderTargetTestImpl() argument
819 SurfaceParameters params(dContext); in DDLMakeRenderTargetTestImpl()
824 test_make_render_target(reporter, dContext, params); in DDLMakeRenderTargetTestImpl()
849 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
851 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(dContext, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
862 SurfaceParameters params(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
864 sk_sp<SkSurface> s = params.make(dContext); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
899 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
903 sk_sp<SkSurface> s = SkSurface::MakeRenderTarget(dContext, SkBudgeted::kNo, ii); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
925 auto dContext = ctxInfo.directContext(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
926 size_t maxResourceBytes = dContext->getResourceCacheLimit(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
927 auto proxy = dContext->threadSafeProxy().get(); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
951 GrBackendFormat goodBackendFormat = dContext->defaultBackendFormat(kRGBA_8888_SkColorType, in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
997 if (dContext->backend() == GrBackendApi::kVulkan) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()