diff options
author | 2017-01-30 13:27:37 -0500 | |
---|---|---|
committer | 2017-01-30 19:05:36 +0000 | |
commit | f200a90f3e58ce20753420cadced850d7d00dca1 (patch) | |
tree | d4618a39bdd6f74b070b236283819ae7f4770d33 /tests | |
parent | efe3dedbb3493b738abdb56041b093245e4e8711 (diff) |
Rationalize GrContext's Gr*Proxy getter naming
This CL replaces the entry points:
asDeferredSurface
asDeferredTexture
asDeferredRenderTarget
with:
GrSurfaceProxy* asSurfaceProxy
sk_sp<GrSurfaceProxy> asSurfaceProxyRef
GrTextureProxy* asTextureProxy
sk_sp<GrTextureProxy> asTextureProxyRef
GrRenderTargetProxy* asRenderTargetProxy
sk_sp<GrRenderTargetProxy> asRenderTargetProxyRef
Change-Id: I7c2b1ea3d702023ff23019815ca13c9ff6f3b32d
Reviewed-on: https://skia-review.googlesource.com/7741
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/EGLImageTest.cpp | 2 | ||||
-rw-r--r-- | tests/IntTextureTest.cpp | 4 | ||||
-rw-r--r-- | tests/RenderTargetContextTest.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index 3011355115..5ea5b3d22d 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp @@ -176,7 +176,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) { // Only test RT-config // TODO: why do we always need to draw to copy from an external texture? - test_copy_from_surface(reporter, context0, surfaceContext->asDeferredSurface(), + test_copy_from_surface(reporter, context0, surfaceContext->asSurfaceProxy(), pixels.get(), true, "EGLImageTest-copy"); cleanup(glCtx0, externalTexture.fID, glCtx1.get(), context1, backendTexture1, image); diff --git a/tests/IntTextureTest.cpp b/tests/IntTextureTest.cpp index 23ccb50cb6..c1da323ede 100644 --- a/tests/IntTextureTest.cpp +++ b/tests/IntTextureTest.cpp @@ -120,11 +120,11 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(IntTexture, reporter, ctxInfo) { sk_sp<GrSurfaceContext> dstContext(GrSurfaceProxy::TestCopy(context, desc, proxy.get())); REPORTER_ASSERT(reporter, dstContext); - if (!dstContext || !dstContext->asDeferredTexture()) { + if (!dstContext || !dstContext->asTextureProxy()) { return; } - GrSurface* copySurface = dstContext->asDeferredTexture()->instantiate( + GrSurface* copySurface = dstContext->asTextureProxy()->instantiate( context->textureProvider()); REPORTER_ASSERT(reporter, copySurface); if (!copySurface) { diff --git a/tests/RenderTargetContextTest.cpp b/tests/RenderTargetContextTest.cpp index 9a4b8747da..5917a2d9d4 100644 --- a/tests/RenderTargetContextTest.cpp +++ b/tests/RenderTargetContextTest.cpp @@ -33,7 +33,7 @@ static void check_is_wrapped_status(skiatest::Reporter* reporter, bool wrappedExpectation) { REPORTER_ASSERT(reporter, rtCtx->isWrapped_ForTesting() == wrappedExpectation); - GrTextureProxy* tProxy = rtCtx->asDeferredTexture(); + GrTextureProxy* tProxy = rtCtx->asTextureProxy(); REPORTER_ASSERT(reporter, tProxy); REPORTER_ASSERT(reporter, tProxy->isWrapped_ForTesting() == wrappedExpectation); @@ -68,7 +68,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(RenderTargetContextTest, reporter, ctxInfo) { check_is_wrapped_status(reporter, rtCtx.get(), false); - GrTextureProxy* tProxy = rtCtx->asDeferredTexture(); + GrTextureProxy* tProxy = rtCtx->asTextureProxy(); REPORTER_ASSERT(reporter, tProxy); GrTexture* tex = tProxy->instantiate(ctx->textureProvider()); |