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

Unified Diff: src/core/SkPictureRecord.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/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 4a6ece17f25a8ce864601ffd706cdf2ebb4aa42a..82977b0db4e56ff79ea0fe6db4b769256a046127 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -218,6 +218,15 @@ void SkPictureRecord::didSetMatrix(const SkMatrix& matrix) {
this->INHERITED::didSetMatrix(matrix);
}
+void SkPictureRecord::didSetZ(const SkScalar z) {
+ this->validate(fWriter.bytesWritten(), 0);
+ // set Z
+ size_t size = sizeof(SkScalar);
+ size_t initialOffset = this->addDraw(SET_Z, &size);
+
+ this->validate(initialOffset, size);
+}
+
static bool regionOpExpands(SkRegion::Op op) {
switch (op) {
case SkRegion::kUnion_Op:

Powered by Google App Engine
This is Rietveld 408576698