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

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

Issue 1529803004: Revert of remove drawSprite from canvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/SkCanvas.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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const SkPaint& paint = *fPictureData->getPaint(reader); 361 const SkPaint& paint = *fPictureData->getPaint(reader);
362 canvas->drawRect(reader->skipT<SkRect>(), paint); 362 canvas->drawRect(reader->skipT<SkRect>(), paint);
363 } break; 363 } break;
364 case DRAW_RRECT: { 364 case DRAW_RRECT: {
365 const SkPaint& paint = *fPictureData->getPaint(reader); 365 const SkPaint& paint = *fPictureData->getPaint(reader);
366 SkRRect rrect; 366 SkRRect rrect;
367 reader->readRRect(&rrect); 367 reader->readRRect(&rrect);
368 canvas->drawRRect(rrect, paint); 368 canvas->drawRRect(rrect, paint);
369 } break; 369 } break;
370 case DRAW_SPRITE: { 370 case DRAW_SPRITE: {
371 /* const SkPaint* paint = */ fPictureData->getPaint(reader); 371 const SkPaint* paint = fPictureData->getPaint(reader);
372 /* const SkBitmap bitmap = */ shallow_copy(fPictureData->getBitmap(r eader)); 372 const SkBitmap bitmap = shallow_copy(fPictureData->getBitmap(reader) );
373 /* int left = */ reader->readInt(); 373 int left = reader->readInt();
374 /* int top = */ reader->readInt(); 374 int top = reader->readInt();
375 // drawSprite removed dec-2015 375 canvas->drawSprite(bitmap, left, top, paint);
376 } break; 376 } break;
377 case DRAW_TEXT: { 377 case DRAW_TEXT: {
378 const SkPaint& paint = *fPictureData->getPaint(reader); 378 const SkPaint& paint = *fPictureData->getPaint(reader);
379 TextContainer text; 379 TextContainer text;
380 get_text(reader, &text); 380 get_text(reader, &text);
381 SkScalar x = reader->readScalar(); 381 SkScalar x = reader->readScalar();
382 SkScalar y = reader->readScalar(); 382 SkScalar y = reader->readScalar();
383 canvas->drawText(text.text(), text.length(), x, y, paint); 383 canvas->drawText(text.text(), text.length(), x, y, paint);
384 } break; 384 } break;
385 case DRAW_TEXT_BLOB: { 385 case DRAW_TEXT_BLOB: {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 case TRANSLATE: { 479 case TRANSLATE: {
480 SkScalar dx = reader->readScalar(); 480 SkScalar dx = reader->readScalar();
481 SkScalar dy = reader->readScalar(); 481 SkScalar dy = reader->readScalar();
482 canvas->translate(dx, dy); 482 canvas->translate(dx, dy);
483 } break; 483 } break;
484 default: 484 default:
485 SkASSERTF(false, "Unknown draw type: %d", op); 485 SkASSERTF(false, "Unknown draw type: %d", op);
486 } 486 }
487 } 487 }
488 488
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698