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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 249253003: Hide SaveFlags from the public SkCanvas API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Suppress the canvas-state GM. Created 6 years, 8 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/SkCanvas.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 514769dbace20ceb146228d7bbb6d6ccf4f749e7..5a89f26be55b6e4e86c7b8a3c3cfa159985d3151 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -1220,12 +1220,22 @@ void SkPicturePlayback::draw(SkCanvas& canvas, SkDrawPictureCallback* callback)
canvas.rotate(reader.readScalar());
break;
case SAVE:
+#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
canvas.save((SkCanvas::SaveFlags) reader.readInt());
+#else
+ reader.readInt(); // Consume SaveFlags.
+ canvas.save();
+#endif
break;
case SAVE_LAYER: {
const SkRect* boundsPtr = this->getRectPtr(reader);
const SkPaint* paint = this->getPaint(reader);
+#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
canvas.saveLayer(boundsPtr, paint, (SkCanvas::SaveFlags) reader.readInt());
+#else
+ reader.readInt(); // Consume SaveFlags.
+ canvas.saveLayer(boundsPtr, paint);
+#endif
} break;
case SCALE: {
SkScalar sx = reader.readScalar();
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698