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

Unified Diff: include/core/SkClipStack.h

Issue 1793373002: Add asRRect method to SkClipStack::Element (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments Created 4 years, 9 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/SkClipStack.cpp » ('j') | src/core/SkClipStack.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkClipStack.h
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 38d6d6751d7506aad3b797bcd6a121b752459003..973f70a42be26b0d329985655a36d1ba3fba6d1e 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -98,6 +98,9 @@ public:
//!< Call to get the element as a path, regardless of its type.
void asPath(SkPath* path) const;
+ //!< Call if getType() is not kPath to get the element as a round rect.
+ const SkRRect& asRRect() const { SkASSERT(kPath_Type != fType); return fRRect; }
+
/** If getType() is not kEmpty this indicates whether the clip shape should be anti-aliased
when it is rasterized. */
bool isAA() const { return fDoAA; }
« no previous file with comments | « no previous file | src/core/SkClipStack.cpp » ('j') | src/core/SkClipStack.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698