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/RectangleTextureTest.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/RectangleTextureTest.cpp')
-rw-r--r-- | tests/RectangleTextureTest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp index f5453bd09d..16dc940e01 100644 --- a/tests/RectangleTextureTest.cpp +++ b/tests/RectangleTextureTest.cpp @@ -12,6 +12,7 @@ #include "GrClip.h" #include "GrContext.h" #include "GrContextPriv.h" +#include "GrProxyProvider.h" #include "GrRenderTargetContext.h" #include "GrTest.h" #include "gl/GLTestContext.h" @@ -85,6 +86,7 @@ static void test_clear(skiatest::Reporter* reporter, GrSurfaceContext* rectConte DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { GrContext* context = ctxInfo.grContext(); + GrProxyProvider* proxyProvider = context->contextPriv().proxyProvider(); sk_gpu_test::GLTestContext* glContext = ctxInfo.glContext(); static const int kWidth = 13; static const int kHeight = 13; @@ -125,9 +127,9 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, reporter, ctxInfo) { } } - sk_sp<GrTextureProxy> rectProxy = GrSurfaceProxy::MakeWrappedBackend(context, - rectangleTex, - origin); + sk_sp<GrTextureProxy> rectProxy = proxyProvider->createWrappedTextureProxy( + rectangleTex, origin); + if (!rectProxy) { ERRORF(reporter, "Error creating proxy for rectangle texture."); GR_GL_CALL(glContext->gl(), DeleteTextures(1, &rectTexID)); |