Chromium Code Reviews| Index: include/core/SkCanvas.h |
| diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
| index ec14829ca85296d12d79d27a04073c6ee587c20e..ce9e52adef727414871f147c50e085c3b98c4f1e 100644 |
| --- a/include/core/SkCanvas.h |
| +++ b/include/core/SkCanvas.h |
| @@ -444,6 +444,19 @@ 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) |
| + */ |
|
robertphillips
2016/07/07 20:43:08
I don't think Z can be restricted to the index ran
vjiaoblack
2016/07/08 17:13:47
Done.
|
| + void setZ(uint32_t z) { |
|
Brian Osman
2016/07/07 20:06:37
If this (and the member variable, getter, etc...)
vjiaoblack
2016/07/08 17:13:47
Acknowledged.
|
| + this->fCurDrawDepth = z; |
| + this->didSetZ(z); |
| + } |
| + |
| + /** Returns the current draw depth of the canvas. |
| + */ |
| + uint32_t getZ() const { return this->fCurDrawDepth; } |
| + |
| /** |
| * Modify the current clip with the specified rectangle. |
| * @param rect The rect to combine with the current clip |
| @@ -1307,6 +1320,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 +1399,8 @@ protected: |
| const SkImageFilter* imageFilter = NULL); |
| private: |
|
robertphillips
2016/07/07 20:43:08
I think we want the Z to be a member of the MCRec
vjiaoblack
2016/07/08 17:13:47
Done.
|
| + uint32_t fCurDrawDepth = 0; |
| + |
| static bool BoundsAffectsClip(SaveLayerFlags); |
| static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFlags); |