diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-16 08:06:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-16 13:28:43 +0000 |
commit | 0bd24dc41f2351d84f5fce32130668a5792d134b (patch) | |
tree | c46dc6fb7636fd7c2185e1f855f1dd582512fcc4 /tests/OnFlushCallbackTest.cpp | |
parent | 3167aa0c9c84cab1b0252031166e4a345e2afe2d (diff) |
Funnel most proxy creation through GrProxyProvider
This is to provide a choke point for DDL to create Lazy Proxies.
Change-Id: If178da13bc6447b31b7601810236d34502d9efbd
Reviewed-on: https://skia-review.googlesource.com/93303
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/OnFlushCallbackTest.cpp')
-rw-r--r-- | tests/OnFlushCallbackTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp index 77ceb8975b..4ca7522ceb 100644 --- a/tests/OnFlushCallbackTest.cpp +++ b/tests/OnFlushCallbackTest.cpp @@ -14,6 +14,7 @@ #include "GrContextPriv.h" #include "GrDefaultGeoProcFactory.h" #include "GrOnFlushResourceProvider.h" +#include "GrProxyProvider.h" #include "GrRenderTargetContextPriv.h" #include "GrResourceProvider.h" #include "GrQuad.h" @@ -474,17 +475,16 @@ sk_sp<GrTextureProxy> pre_create_atlas(GrContext* context) { } #else // TODO: this is unfortunate and must be removed. We want the atlas to be created later. -sk_sp<GrTextureProxy> pre_create_atlas(GrContext* context) { +sk_sp<GrTextureProxy> pre_create_atlas(GrProxyProvider* proxyProvider) { GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fOrigin = kBottomLeft_GrSurfaceOrigin; desc.fWidth = 32; desc.fHeight = 16; desc.fConfig = kSkia8888_GrPixelConfig; - return GrSurfaceProxy::MakeDeferred(context->contextPriv().proxyProvider(), - desc, SkBackingFit::kExact, - SkBudgeted::kYes, - GrResourceProvider::kNoPendingIO_Flag); + + return proxyProvider->createProxy(desc, SkBackingFit::kExact, SkBudgeted::kYes, + GrResourceProvider::kNoPendingIO_Flag); } #endif @@ -520,7 +520,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(OnFlushCallbackTest, reporter, ctxInfo) { // For now (until we add a GrSuperDeferredSimpleTextureEffect), we create the final atlas // proxy ahead of time. - sk_sp<GrTextureProxy> atlasDest = pre_create_atlas(context); + sk_sp<GrTextureProxy> atlasDest = pre_create_atlas(context->contextPriv().proxyProvider()); object.setAtlasDest(atlasDest); |