Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 2262473003: Define clear regions in terms of GrFixedClip (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_fixedcliptosrc
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrFixedClip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index dc2fd3086121761bc96f7b57ea5f2d059ac7e805..f3c9847086d1d0c792380a8552b406b396dfa1a5 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -458,9 +458,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();
}
@@ -618,8 +616,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();
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrFixedClip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698