diff options
author | csmartdalton <csmartdalton@google.com> | 2016-08-31 11:55:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-31 11:55:52 -0700 |
commit | 29df76096fd30941086324902a82656df2d8becd (patch) | |
tree | 37740539e50fcdc09d694bc39e98e55aa26cf3f4 /src/gpu/GrDrawTarget.cpp | |
parent | dc43898bbbd06202562514ae785116e0cc40f825 (diff) |
Define clear regions in terms of GrFixedClip
Updates clear APIs to take GrFixedClip instead of a rectangle. This
will allow us to use window rectangles with clears. Removes stencil
knobs from GrFixedClip.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262473003
Review-Url: https://codereview.chromium.org/2262473003
Diffstat (limited to 'src/gpu/GrDrawTarget.cpp')
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index 45ec9acb9c..f568f7e17f 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -459,9 +459,7 @@ void GrDrawTarget::fullClear(GrRenderTarget* renderTarget, GrColor color) { fLastFullClearBatch->setColor(color); return; } - sk_sp<GrClearBatch> batch(GrClearBatch::Make(SkIRect::MakeWH(renderTarget->width(), - renderTarget->height()), - color, renderTarget)); + sk_sp<GrClearBatch> batch(GrClearBatch::Make(GrFixedClip::Disabled(), color, renderTarget)); if (batch.get() == this->recordBatch(batch.get(), batch->bounds())) { fLastFullClearBatch = batch.get(); } @@ -619,8 +617,10 @@ void GrDrawTarget::forwardCombine() { /////////////////////////////////////////////////////////////////////////////// -void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* rt) { - GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); +void GrDrawTarget::clearStencilClip(const GrFixedClip& clip, + bool insideStencilMask, + GrRenderTarget* rt) { + GrBatch* batch = new GrClearStencilClipBatch(clip, insideStencilMask, rt); this->recordBatch(batch, batch->bounds()); batch->unref(); } |