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

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

Issue 1913843002: Enable flattening of SkRecordedDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix backward compatibility Created 4 years, 7 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } break; 250 } break;
251 case DRAW_CLEAR: 251 case DRAW_CLEAR:
252 canvas->clear(reader->readInt()); 252 canvas->clear(reader->readInt());
253 break; 253 break;
254 case DRAW_DATA: { 254 case DRAW_DATA: {
255 // This opcode is now dead, just need to skip it for backwards compa tibility 255 // This opcode is now dead, just need to skip it for backwards compa tibility
256 size_t length = reader->readInt(); 256 size_t length = reader->readInt();
257 (void)reader->skip(length); 257 (void)reader->skip(length);
258 // skip handles padding the read out to a multiple of 4 258 // skip handles padding the read out to a multiple of 4
259 } break; 259 } break;
260 case DRAW_DRAWABLE:
261 canvas->drawDrawable(fPictureData->getDrawable(reader));
262 break;
263 case DRAW_DRAWABLE_MATRIX: {
264 SkMatrix matrix;
265 reader->readMatrix(&matrix);
266 SkDrawable* drawable = fPictureData->getDrawable(reader);
267 canvas->drawDrawable(drawable, &matrix);
268 } break;
260 case DRAW_DRRECT: { 269 case DRAW_DRRECT: {
261 const SkPaint& paint = *fPictureData->getPaint(reader); 270 const SkPaint& paint = *fPictureData->getPaint(reader);
262 SkRRect outer, inner; 271 SkRRect outer, inner;
263 reader->readRRect(&outer); 272 reader->readRRect(&outer);
264 reader->readRRect(&inner); 273 reader->readRRect(&inner);
265 canvas->drawDRRect(outer, inner, paint); 274 canvas->drawDRRect(outer, inner, paint);
266 } break; 275 } break;
267 case BEGIN_COMMENT_GROUP: { 276 case BEGIN_COMMENT_GROUP: {
268 SkString tmp; 277 SkString tmp;
269 reader->readString(&tmp); 278 reader->readString(&tmp);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } break; 569 } break;
561 case TRANSLATE: { 570 case TRANSLATE: {
562 SkScalar dx = reader->readScalar(); 571 SkScalar dx = reader->readScalar();
563 SkScalar dy = reader->readScalar(); 572 SkScalar dy = reader->readScalar();
564 canvas->translate(dx, dy); 573 canvas->translate(dx, dy);
565 } break; 574 } break;
566 default: 575 default:
567 SkASSERTF(false, "Unknown draw type: %d", op); 576 SkASSERTF(false, "Unknown draw type: %d", op);
568 } 577 }
569 } 578 }
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