diff options
author | Robert Phillips <robertphillips@google.com> | 2017-01-30 13:27:37 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-30 19:05:36 +0000 |
commit | f200a90f3e58ce20753420cadced850d7d00dca1 (patch) | |
tree | d4618a39bdd6f74b070b236283819ae7f4770d33 /gm | |
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 'gm')
-rw-r--r-- | gm/image_pict.cpp | 2 | ||||
-rw-r--r-- | gm/texdata.cpp | 2 | ||||
-rw-r--r-- | gm/windowrectangles.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 5394f6a656..7ddc84ddb3 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -265,7 +265,7 @@ protected: return nullptr; } - GrSurface* dstSurf = dstContext->asDeferredSurface()->instantiate(fCtx->textureProvider()); + GrSurface* dstSurf = dstContext->asSurfaceProxy()->instantiate(fCtx->textureProvider()); if (!dstSurf) { return nullptr; } diff --git a/gm/texdata.cpp b/gm/texdata.cpp index 6b229a3db3..2921afdfb7 100644 --- a/gm/texdata.cpp +++ b/gm/texdata.cpp @@ -118,7 +118,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) { } else { vm.reset(); } - paint.addColorTextureProcessor(context, sk_ref_sp(tContext->asDeferredTexture()), + paint.addColorTextureProcessor(context, tContext->asTextureProxyRef(), nullptr, vm); renderTargetContext->drawRect(clip, GrPaint(paint), GrAA::kNo, vm, diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp index c335c985ad..d0ec023a64 100644 --- a/gm/windowrectangles.cpp +++ b/gm/windowrectangles.cpp @@ -224,7 +224,7 @@ void WindowRectanglesMaskGM::visualizeAlphaMask(GrContext* ctx, GrRenderTargetCo // Now visualize the alpha mask by drawing a rect over the area where it is defined. The regions // inside window rectangles or outside the scissor should still have the initial checkerboard // intact. (This verifies we didn't spend any time modifying those pixels in the mask.) - AlphaOnlyClip clip(ctx, sk_ref_sp(maskRTC->asDeferredTexture()), x, y); + AlphaOnlyClip clip(ctx, maskRTC->asTextureProxyRef(), x, y); rtc->drawRect(clip, std::move(paint), GrAA::kYes, SkMatrix::I(), SkRect::Make(SkIRect::MakeXYWH(x, y, maskRTC->width(), maskRTC->height()))); } |