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

Unified Diff: include/core/SkCanvas.h

Issue 189883010: hide getTotalClip, so we can eventually remove it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « gyp/skia_for_chromium_defines.gypi ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index a987708c4216683e9d5bd2d4ce7a1b588269ab95..093185c940400eaf1aa31fce2579665dee82e46d 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -19,6 +19,8 @@
#include "SkXfermode.h"
//#define SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG
+//#define SK_SUPPORT_LEGACY_GETCLIPTYPE
+//#define SK_SUPPORT_LEGACY_GETTOTALCLIP
class SkBounder;
class SkBaseDevice;
@@ -1057,29 +1059,38 @@ public:
*/
virtual bool isClipEmpty() const;
+ /**
+ * Returns true if the current clip is just a (non-empty) rectangle.
+ * Returns false if the clip is empty, or if it is complex.
+ */
+ virtual bool isClipRect() const;
+
/** Return the current matrix on the canvas.
This does not account for the translate in any of the devices.
@return The current matrix on the canvas.
*/
const SkMatrix& getTotalMatrix() const;
+#ifdef SK_SUPPORT_LEGACY_GETCLIPTYPE
enum ClipType {
kEmpty_ClipType = 0,
kRect_ClipType,
kComplex_ClipType
};
-
/** Returns a description of the total clip; may be cheaper than
getting the clip and querying it directly.
*/
virtual ClipType getClipType() const;
+#endif
+#ifdef SK_SUPPORT_LEGACY_GETTOTALCLIP
/** DEPRECATED -- need to move this guy to private/friend
* Return the current device clip (concatenation of all clip calls).
* This does not account for the translate in any of the devices.
* @return the current device clip (concatenation of all clip calls).
*/
const SkRegion& getTotalClip() const;
+#endif
/** Return the clip stack. The clip stack stores all the individual
* clips organized by the save/restore frame in which they were
@@ -1145,6 +1156,11 @@ public:
bool fDone;
};
+ // don't call
+ const SkRegion& internal_private_getTotalClip() const;
+ // don't call
+ void internal_private_getTotalClipAsPath(SkPath*) const;
+
protected:
// default impl defers to getDevice()->newSurface(info)
virtual SkSurface* onNewSurface(const SkImageInfo&);
« no previous file with comments | « gyp/skia_for_chromium_defines.gypi ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698