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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 1837913003: Add support for serializing/deserializing of SkDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add ability to specify custom flattenable factories on SkReadBuffer Created 4 years, 9 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/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index f21ac32b961f0bcec6984951748b925e93e58189..f3bf62ca0bdf89315c2c4ed2f2205e0c14836b95 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -239,6 +239,15 @@ void SkPicturePlayback::handleOp(SkReader32* reader,
(void)reader->skip(length);
// skip handles padding the read out to a multiple of 4
} break;
+ case DRAW_DRAWABLE:
+ canvas->drawDrawable(fPictureData->getDrawable(reader));
+ break;
+ case DRAW_DRAWABLE_MATRIX: {
+ SkMatrix matrix;
+ reader->readMatrix(&matrix);
+ SkDrawable* drawable = fPictureData->getDrawable(reader);
+ canvas->drawDrawable(drawable, &matrix);
+ } break;
case DRAW_DRRECT: {
const SkPaint& paint = *fPictureData->getPaint(reader);
SkRRect outer, inner;

Powered by Google App Engine
This is Rietveld 408576698