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

Unified Diff: include/core/SkCanvas.h

Issue 2127233002: Added the framework for having canvas/recorder/picture record depth_set's. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Fixed more crumbs Created 4 years, 5 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 | include/private/SkRecords.h » ('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 ec14829ca85296d12d79d27a04073c6ee587c20e..3d75f8c04972d561ce492306a1cdff5cfee70e35 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -444,6 +444,17 @@ public:
*/
void resetMatrix();
+ /** Set the current draw depth of the canvas.
reed1 2016/07/11 19:36:28 Is the default 0 or 1?
vjiaoblack 2016/07/11 19:48:13 Done.
+ @param z The SkScalar depth; it's tracked in the save/restore stack.
+ Negative into screen, positive out of screen.
+
+ */
+ void setZ(SkScalar z);
+
+ /** Returns the current draw depth of the canvas.
+ */
+ SkScalar getZ() const;
+
/**
* Modify the current clip with the specified rectangle.
* @param rect The rect to combine with the current clip
@@ -1307,6 +1318,7 @@ protected:
virtual void didRestore() {}
virtual void didConcat(const SkMatrix&) {}
virtual void didSetMatrix(const SkMatrix&) {}
+ virtual void didSetZ(SkScalar) {}
virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value);
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
« no previous file with comments | « no previous file | include/private/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698