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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 429343004: Stopped skipping tests in dm of SkPatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 d16a6353e9d544661d8428778cbe61ed9a1e89f1..d785618234d0d4705da38be1e1f8ece8ae666aee 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -306,6 +306,12 @@ void SkPicturePlayback::handleOp(SkReader32* reader,
case DRAW_PAINT:
canvas->drawPaint(*fPictureData->getPaint(reader));
break;
+ case DRAW_PATCH: {
+ const SkPaint& paint = *fPictureData->getPaint(reader);
robertphillips 2014/08/04 18:44:18 12 -> kNum... etc.
dandov 2014/08/04 19:59:27 Done.
+ const SkPoint* pts = (const SkPoint*)reader->skip(sizeof(SkPoint)* 12);
mtklein 2014/08/04 18:23:03 Not keen on expressing the format twice. Can't we
dandov 2014/08/04 19:59:27 Done. Used reader.readPatch().
+ const SkColor* colors = (const SkColor*)reader->skip(sizeof(SkColor)* 4);
+ canvas->drawPatch(SkPatch(pts, colors), paint);
+ } break;
case DRAW_PATH: {
const SkPaint& paint = *fPictureData->getPaint(reader);
canvas->drawPath(fPictureData->getPath(reader), paint);

Powered by Google App Engine
This is Rietveld 408576698