aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBlurUtils.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-12-09 13:35:02 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-09 19:29:38 +0000
commit784b7bf493c37236e3fe571aed6105939a9bc0c3 (patch)
treee3045c15fff092df38e8e646197d532f441ae8b1 /src/gpu/GrBlurUtils.cpp
parente29ce641d378022a18f1dac731a71784b3eb5a11 (diff)
Different approach to fixing gpu blurs on platforms that "useDrawInsteadOfClear"
This CL reverts https://skia-review.googlesource.com/c/5148/ (Fix gpu blurring on platforms that "useDrawInsteadOfClear") (all the worstCaseWidth/Height stuff) and adds a new GrRenderTargetContext entry point (absClear) to specify clears that can't be discarded or altered. BUG=skia: Change-Id: I18b1373ecf4a153ca8c0f290ab8b1d00770426da Reviewed-on: https://skia-review.googlesource.com/5484 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrBlurUtils.cpp')
-rw-r--r--src/gpu/GrBlurUtils.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 8f14bf75e5..4d89bef63c 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -10,6 +10,7 @@
#include "GrCaps.h"
#include "GrContext.h"
#include "GrFixedClip.h"
+#include "GrRenderTargetContextPriv.h"
#include "effects/GrSimpleTextureEffect.h"
#include "GrStyle.h"
#include "GrTexture.h"
@@ -111,7 +112,7 @@ static sk_sp<GrTextureProxy> create_mask_GPU(GrContext* context,
return nullptr;
}
- rtContext->clear(nullptr, 0x0, true);
+ rtContext->priv().absClear(nullptr, 0x0);
GrPaint tempPaint;
tempPaint.setAntiAlias(doAA);
@@ -141,8 +142,8 @@ static void draw_path_with_mask_filter(GrContext* context,
SkASSERT(maskFilter);
SkIRect clipBounds;
- clip.getConservativeBounds(renderTargetContext->worstCaseWidth(),
- renderTargetContext->worstCaseHeight(),
+ clip.getConservativeBounds(renderTargetContext->width(),
+ renderTargetContext->height(),
&clipBounds);
SkTLazy<SkPath> tmpPath;
SkStrokeRec::InitStyle fillOrHairline;