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

Unified Diff: src/core/SkAAClip.h

Issue 443353004: add isRect() check to AAClip, to detect if a soft-clip is really just an irect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | src/core/SkAAClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAAClip.h
diff --git a/src/core/SkAAClip.h b/src/core/SkAAClip.h
index f2cde62dbc8d90387a83fe4ff806fb60ea49bfc5..c36a3e98ce734d1ce1096edc244034372ba91403 100644
--- a/src/core/SkAAClip.h
+++ b/src/core/SkAAClip.h
@@ -29,6 +29,10 @@ public:
bool isEmpty() const { return NULL == fRunHead; }
const SkIRect& getBounds() const { return fBounds; }
+ // Returns true iff the clip is not empty, and is just a hard-edged rect (no partial alpha).
+ // If true, getBounds() can be used in place of this clip.
+ bool isRect() const;
+
bool setEmpty();
bool setRect(const SkIRect&);
bool setRect(const SkRect&, bool doAA = true);
« no previous file with comments | « no previous file | src/core/SkAAClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698