diff options
author | 2014-03-08 03:57:19 +0000 | |
---|---|---|
committer | 2014-03-08 03:57:19 +0000 | |
commit | 5c70cdca5efe541b70d010e91607bf8626ea49ca (patch) | |
tree | 4099bb80e271cd9bf2a80dccbf3ec916b61f1fee /include/core/SkCanvas.h | |
parent | e62513fb9274b65bcd9fecf61acc418dd3949df5 (diff) |
hide getTotalClip, so we can eventually remove it
hide getClipType, so we can eventually remove it
patch from issue 189443007
TBR=robertphilips@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/189883010
git-svn-id: http://skia.googlecode.com/svn/trunk@13715 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkCanvas.h')
-rw-r--r-- | include/core/SkCanvas.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index a987708c42..093185c940 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&); |