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

Side by Side Diff: src/core/SkPicturePlayback.cpp

Issue 1761793003: Revert of move annotations to canvas virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPictureData.h" 10 #include "SkPictureData.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } break; 169 } break;
170 case PUSH_CULL: break; // Deprecated, safe to ignore both push and pop. 170 case PUSH_CULL: break; // Deprecated, safe to ignore both push and pop.
171 case POP_CULL: break; 171 case POP_CULL: break;
172 case CONCAT: { 172 case CONCAT: {
173 SkMatrix matrix; 173 SkMatrix matrix;
174 reader->readMatrix(&matrix); 174 reader->readMatrix(&matrix);
175 canvas->concat(matrix); 175 canvas->concat(matrix);
176 break; 176 break;
177 } 177 }
178 case DRAW_ANNOTATION: {
179 const SkRect& rect = reader->skipT<SkRect>();
180 const char* key = reader->readString();
181 SkAutoTUnref<SkData> value(reader->readData());
182 canvas->drawAnnotation(rect, key, value);
183 } break;
184 case DRAW_ATLAS: { 178 case DRAW_ATLAS: {
185 const SkPaint* paint = fPictureData->getPaint(reader); 179 const SkPaint* paint = fPictureData->getPaint(reader);
186 const SkImage* atlas = fPictureData->getImage(reader); 180 const SkImage* atlas = fPictureData->getImage(reader);
187 const uint32_t flags = reader->readU32(); 181 const uint32_t flags = reader->readU32();
188 const int count = reader->readU32(); 182 const int count = reader->readU32();
189 const SkRSXform* xform = (const SkRSXform*)reader->skip(count * size of(SkRSXform)); 183 const SkRSXform* xform = (const SkRSXform*)reader->skip(count * size of(SkRSXform));
190 const SkRect* tex = (const SkRect*)reader->skip(count * sizeof(SkRec t)); 184 const SkRect* tex = (const SkRect*)reader->skip(count * sizeof(SkRec t));
191 const SkColor* colors = nullptr; 185 const SkColor* colors = nullptr;
192 SkXfermode::Mode mode = SkXfermode::kDst_Mode; 186 SkXfermode::Mode mode = SkXfermode::kDst_Mode;
193 if (flags & DRAW_ATLAS_HAS_COLORS) { 187 if (flags & DRAW_ATLAS_HAS_COLORS) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 case TRANSLATE: { 521 case TRANSLATE: {
528 SkScalar dx = reader->readScalar(); 522 SkScalar dx = reader->readScalar();
529 SkScalar dy = reader->readScalar(); 523 SkScalar dy = reader->readScalar();
530 canvas->translate(dx, dy); 524 canvas->translate(dx, dy);
531 } break; 525 } break;
532 default: 526 default:
533 SkASSERTF(false, "Unknown draw type: %d", op); 527 SkASSERTF(false, "Unknown draw type: %d", op);
534 } 528 }
535 } 529 }
536 530
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698