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

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
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 1889b87133dc5fa1719442df80a2bb84bbc6e308..ca51e0d0056127fe98ffa2cb92dbbe23ea82d0f3 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();
}
@@ -615,8 +613,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') | src/gpu/GrFixedClip.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698