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

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: 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/core/SkLights.h » ('j') | include/core/SkLights.h » ('J')
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..1b1c03065c9ca77ca3e4d3da5042be8ad3df0470 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -444,6 +444,16 @@ public:
*/
void resetMatrix();
+ /** Set the current draw depth of the canvas.
+ @param z The integer depth, intended between 0 - 255 inclusive
+ 0 is lowest (into screen), 255 is highest (out of screen)
+ */
+ void setZ(uint32_t z);
+
+ /** Returns the current draw depth of the canvas.
+ */
+ uint32_t getZ() const;
+
/**
* Modify the current clip with the specified rectangle.
* @param rect The rect to combine with the current clip
@@ -1307,6 +1317,7 @@ protected:
virtual void didRestore() {}
virtual void didConcat(const SkMatrix&) {}
virtual void didSetMatrix(const SkMatrix&) {}
+ virtual void didSetZ(const uint32_t) {}
virtual void onDrawAnnotation(const SkRect&, const char key[], SkData* value);
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
@@ -1385,6 +1396,8 @@ protected:
const SkImageFilter* imageFilter = NULL);
private:
+ uint32_t curDrawDepth = 0;
jvanverth1 2016/07/07 18:43:02 Member variables need to start with 'f', so this s
vjiaoblack 2016/07/07 19:04:10 Done.
+
static bool BoundsAffectsClip(SaveLayerFlags);
static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFlags);
« no previous file with comments | « no previous file | include/core/SkLights.h » ('j') | include/core/SkLights.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698