diff options
author | Robert Phillips <robertphillips@google.com> | 2016-11-23 19:37:13 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-25 21:36:00 +0000 |
commit | 93f1633abca95e302fdd31ece0f4d602b0b26708 (patch) | |
tree | 6748ace1f1f7fc629e29511e22ffe96e023432b8 /src/gpu/batches | |
parent | 58cda8fa495225bbcb3d93bdd7f81ec515402475 (diff) |
Fix gpu blurring on platforms that "useDrawInsteadOfClear"
Platforms that "useDrawInsteadOfClear" take a different path in
GrRenderTargetContext::internalClear. The different path involves
a lot of comparisons of the drawn rect with the bounds of the RenderTarget. Since the RenderTargets are now deferred (and the instantiated version might be larger than the proxied size) case must be taken in prematurely optimizing away clears and draws.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5148
TBR=bsalomon@google.com
Change-Id: If63b6393fb66328175bc92de211e7242e903f25e
Reviewed-on: https://skia-review.googlesource.com/5148
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrAAHairLinePathRenderer.cpp | 4 | ||||
-rw-r--r-- | src/gpu/batches/GrTessellatingPathRenderer.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp index eb1be15b74..70c491111f 100644 --- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp @@ -961,8 +961,8 @@ bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) { SkASSERT(!args.fRenderTargetContext->isUnifiedMultisampled()); SkIRect devClipBounds; - args.fClip->getConservativeBounds(args.fRenderTargetContext->width(), - args.fRenderTargetContext->height(), + args.fClip->getConservativeBounds(args.fRenderTargetContext->worstCaseWidth(), + args.fRenderTargetContext->worstCaseHeight(), &devClipBounds); SkPath path; diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp index 5260368890..8e17ea4f61 100644 --- a/src/gpu/batches/GrTessellatingPathRenderer.cpp +++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp @@ -353,8 +353,8 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) { GR_AUDIT_TRAIL_AUTO_FRAME(args.fRenderTargetContext->auditTrail(), "GrTessellatingPathRenderer::onDrawPath"); SkIRect clipBoundsI; - args.fClip->getConservativeBounds(args.fRenderTargetContext->width(), - args.fRenderTargetContext->height(), + args.fClip->getConservativeBounds(args.fRenderTargetContext->worstCaseWidth(), + args.fRenderTargetContext->worstCaseHeight(), &clipBoundsI); sk_sp<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fPaint->getColor(), *args.fShape, |