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

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

Issue 1779263003: Make sp variants for SkData (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/SkPictureData.cpp ('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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: { 178 case DRAW_ANNOTATION: {
179 const SkRect& rect = reader->skipT<SkRect>(); 179 const SkRect& rect = reader->skipT<SkRect>();
180 const char* key = reader->readString(); 180 const char* key = reader->readString();
181 SkAutoTUnref<SkData> value(reader->readData()); 181 canvas->drawAnnotation(rect, key, reader->readData().get());
182 canvas->drawAnnotation(rect, key, value);
183 } break; 182 } break;
184 case DRAW_ATLAS: { 183 case DRAW_ATLAS: {
185 const SkPaint* paint = fPictureData->getPaint(reader); 184 const SkPaint* paint = fPictureData->getPaint(reader);
186 const SkImage* atlas = fPictureData->getImage(reader); 185 const SkImage* atlas = fPictureData->getImage(reader);
187 const uint32_t flags = reader->readU32(); 186 const uint32_t flags = reader->readU32();
188 const int count = reader->readU32(); 187 const int count = reader->readU32();
189 const SkRSXform* xform = (const SkRSXform*)reader->skip(count * size of(SkRSXform)); 188 const SkRSXform* xform = (const SkRSXform*)reader->skip(count * size of(SkRSXform));
190 const SkRect* tex = (const SkRect*)reader->skip(count * sizeof(SkRec t)); 189 const SkRect* tex = (const SkRect*)reader->skip(count * sizeof(SkRec t));
191 const SkColor* colors = nullptr; 190 const SkColor* colors = nullptr;
192 SkXfermode::Mode mode = SkXfermode::kDst_Mode; 191 SkXfermode::Mode mode = SkXfermode::kDst_Mode;
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 case TRANSLATE: { 526 case TRANSLATE: {
528 SkScalar dx = reader->readScalar(); 527 SkScalar dx = reader->readScalar();
529 SkScalar dy = reader->readScalar(); 528 SkScalar dy = reader->readScalar();
530 canvas->translate(dx, dy); 529 canvas->translate(dx, dy);
531 } break; 530 } break;
532 default: 531 default:
533 SkASSERTF(false, "Unknown draw type: %d", op); 532 SkASSERTF(false, "Unknown draw type: %d", op);
534 } 533 }
535 } 534 }
536 535
OLDNEW
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698