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

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

Issue 549143003: Fix bug in layer hoisting transition to SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 3 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/SkRecordDraw.h ('k') | src/gpu/GrLayerCache.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 "SkRecordDraw.h" 8 #include "SkRecordDraw.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 10
(...skipping 30 matching lines...) Expand all
41 return; 41 return;
42 } 42 }
43 record.visit<void>(i, draw); 43 record.visit<void>(i, draw);
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 void SkRecordPartialDraw(const SkRecord& record, 48 void SkRecordPartialDraw(const SkRecord& record,
49 SkCanvas* canvas, 49 SkCanvas* canvas,
50 const SkRect& clearRect, 50 const SkRect& clearRect,
51 unsigned start, unsigned stop) { 51 unsigned start, unsigned stop,
52 const SkMatrix& initialCTM) {
52 SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/); 53 SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/);
53 54
54 stop = SkTMin(stop, record.count()); 55 stop = SkTMin(stop, record.count());
55 SkRecords::PartialDraw draw(canvas, clearRect); 56 SkRecords::PartialDraw draw(canvas, clearRect, initialCTM);
56 for (unsigned i = start; i < stop; i++) { 57 for (unsigned i = start; i < stop; i++) {
57 record.visit<void>(i, draw); 58 record.visit<void>(i, draw);
58 } 59 }
59 } 60 }
60 61
61 namespace SkRecords { 62 namespace SkRecords {
62 63
63 // FIXME: SkBitmaps are stateful, so we need to copy them to play back in multip le threads. 64 // FIXME: SkBitmaps are stateful, so we need to copy them to play back in multip le threads.
64 static SkBitmap shallow_copy(const SkBitmap& bitmap) { 65 static SkBitmap shallow_copy(const SkBitmap& bitmap) {
65 return bitmap; 66 return bitmap;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // Used to track the bounds of Save/Restore blocks and the control ops insid e them. 508 // Used to track the bounds of Save/Restore blocks and the control ops insid e them.
508 SkTDArray<SaveBounds> fSaveStack; 509 SkTDArray<SaveBounds> fSaveStack;
509 SkTDArray<unsigned> fControlIndices; 510 SkTDArray<unsigned> fControlIndices;
510 }; 511 };
511 512
512 } // namespace SkRecords 513 } // namespace SkRecords
513 514
514 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { 515 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) {
515 SkRecords::FillBounds(record, bbh); 516 SkRecords::FillBounds(record, bbh);
516 } 517 }
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.h ('k') | src/gpu/GrLayerCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698