From 5491e823cca01a09435dfbd21ba189d26504baad Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Wed, 27 Jun 2018 12:54:44 -0400 Subject: Switch createAlphaClipMask to use kTopLeft This makes createAlphaClipMask match createSoftwareClipMask Bug: 854875 Change-Id: I92a81f5025a19548c6225f39c84b2b2f87c53550 Reviewed-on: https://skia-review.googlesource.com/137888 Commit-Queue: Robert Phillips Reviewed-by: Chris Dalton --- src/gpu/GrClipStackClip.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp index 04b8b8155e..68c18be5e8 100644 --- a/src/gpu/GrClipStackClip.cpp +++ b/src/gpu/GrClipStackClip.cpp @@ -333,17 +333,20 @@ sk_sp GrClipStackClip::createAlphaClipMask(GrContext* context, reducedClip.numAnalyticFPs(), &key); sk_sp proxy(proxyProvider->findOrCreateProxyByUniqueKey( - key, kBottomLeft_GrSurfaceOrigin)); + key, kTopLeft_GrSurfaceOrigin)); if (proxy) { return proxy; } sk_sp rtc( - context->contextPriv().makeDeferredRenderTargetContextWithFallback(SkBackingFit::kApprox, - reducedClip.width(), - reducedClip.height(), - kAlpha_8_GrPixelConfig, - nullptr)); + context->contextPriv().makeDeferredRenderTargetContextWithFallback( + SkBackingFit::kApprox, + reducedClip.width(), + reducedClip.height(), + kAlpha_8_GrPixelConfig, + nullptr, 1, + GrMipMapped::kNo, + kTopLeft_GrSurfaceOrigin)); if (!rtc) { return nullptr; } @@ -357,7 +360,7 @@ sk_sp GrClipStackClip::createAlphaClipMask(GrContext* context, return nullptr; } - SkASSERT(result->origin() == kBottomLeft_GrSurfaceOrigin); + SkASSERT(result->origin() == kTopLeft_GrSurfaceOrigin); proxyProvider->assignUniqueKeyToProxy(key, result.get()); add_invalidate_on_pop_message(*fStack, reducedClip.maskGenID(), key); -- cgit v1.2.3