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

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 tests to be more rigorous about translateZ in playback 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 | « src/core/SkPictureRecord.h ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 4a6ece17f25a8ce864601ffd706cdf2ebb4aa42a..787d14aaff777395b5b04239b6f3bb3f35686765 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -218,6 +218,16 @@ void SkPictureRecord::didSetMatrix(const SkMatrix& matrix) {
this->INHERITED::didSetMatrix(matrix);
}
+void SkPictureRecord::didTranslateZ(SkScalar z) {
+ this->validate(fWriter.bytesWritten(), 0);
+ // op + scalar
+ size_t size = 1 * kUInt32Size + 1 * sizeof(SkScalar);
+ size_t initialOffset = this->addDraw(TRANSLATE_Z, &size);
+ this->addScalar(z);
+ this->validate(initialOffset, size);
+ this->INHERITED::didTranslateZ(z);
+}
+
static bool regionOpExpands(SkRegion::Op op) {
switch (op) {
case SkRegion::kUnion_Op:
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698