diff options
author | 2011-12-14 18:48:05 +0000 | |
---|---|---|
committer | 2011-12-14 18:48:05 +0000 | |
commit | 7c2029367cea5479fa3b74fb0ca2b0297b42b709 (patch) | |
tree | 1257e66303035f327a1d2536997f6d697cd9556a /include | |
parent | afcb55c8cb09f0e43ff50eb0f0aa3525ecfb8ca7 (diff) |
add canvas::isDrawingToLayer(), as a fast query for chrome; faster than
setting up a drawiter and counting the layers.
git-svn-id: http://skia.googlecode.com/svn/trunk@2875 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 08bd0f027d..24e4141442 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -287,6 +287,11 @@ public: */ void restoreToCount(int saveCount); + /** Returns true if drawing is currently going to a layer (from saveLayer) + * rather than to the root device. + */ + bool isDrawingToLayer() const; + /** Preconcat the current matrix with the specified translation @param dx The distance to translate in X @param dy The distance to translate in Y @@ -932,6 +937,7 @@ private: SkBounder* fBounder; SkDevice* fLastDeviceToGainFocus; + int fLayerCount; // number of successful saveLayer calls void prepareForDeviceDraw(SkDevice*, const SkMatrix&, const SkRegion&, const SkClipStack& clipStack); |