diff options
author | 2016-07-13 14:05:28 -0700 | |
---|---|---|
committer | 2016-07-13 14:05:28 -0700 | |
commit | e5de130788c8637d2f7df9ddb0241b78e04d5882 (patch) | |
tree | e837af1f0ce2a87a9b4be70172f74d9a5dea57a4 /include/core | |
parent | f382b48687176f15091c2defc0002f0a189f4167 (diff) |
Added the framework for having canvas/recorder/picture record depth_set's.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127233002
Committed: https://skia.googlesource.com/skia/+/6d3fb898d5f73a82e36f11c712a633c3921ed518
Committed: https://skia.googlesource.com/skia/+/1185d90c785f743364cc9113d7007a59af07470c
Review-Url: https://codereview.chromium.org/2127233002
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkCanvas.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 97aa3c7d8e..35a8d1c7b9 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -451,6 +451,13 @@ public: */ void resetMatrix(); + /** Add the specified translation to the current draw depth of the canvas. + @param z The distance to translate in Z. + Negative into screen, positive out of screen. + Without translation, the draw depth defaults to 0. + */ + void translateZ(SkScalar z); + /** * Modify the current clip with the specified rectangle. * @param rect The rect to combine with the current clip @@ -1260,6 +1267,10 @@ public: void temporary_internal_describeTopLayer(SkMatrix* matrix, SkIRect* clip_bounds); protected: + /** Returns the current (cumulative) draw depth of the canvas. + */ + SkScalar getZ() const; + /** After calling saveLayer(), there can be any number of devices that make up the top-most drawing area. LayerIter can be used to iterate through those devices. Note that the iterator is only valid until the next API @@ -1325,6 +1336,7 @@ protected: virtual void didRestore() {} virtual void didConcat(const SkMatrix&) {} virtual void didSetMatrix(const SkMatrix&) {} + virtual void didTranslateZ(SkScalar) {} virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value); virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); |