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

Unified Diff: src/core/SkCanvas.cpp

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: Updated requested changes (more functions, added to Debug, etc) 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
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index ce90275047a6466cf9217e32bc0e9505ed8eff36..fa871f42bb0847302d8005ccf456ccdfaa077890 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -294,6 +294,8 @@ public:
SkMatrix fMatrix;
int fDeferredSaveCount;
+ SkScalar fCurDrawDepth;
+
MCRec(bool conservativeRasterClip) : fRasterClip(conservativeRasterClip) {
fFilter = nullptr;
fLayer = nullptr;
@@ -1521,6 +1523,16 @@ void SkCanvas::resetMatrix() {
this->setMatrix(SkMatrix::I());
}
+void SkCanvas::setZ(SkScalar z) {
+ this->fMCRec->fCurDrawDepth = z;
+ this->didSetZ(z);
+}
+
robertphillips 2016/07/08 17:26:43 not uint32_t
vjiaoblack 2016/07/11 18:04:42 Done.
+uint32_t SkCanvas::getZ() const {
+ return this->fMCRec->fCurDrawDepth;
+}
+
+
//////////////////////////////////////////////////////////////////////////////
void SkCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {

Powered by Google App Engine
This is Rietveld 408576698