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

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

Issue 378343002: Refactor SkPicturePlayback for SkPictureReplacementPlayback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move StepIterator to be next to SkipIterTo Created 6 years, 5 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 | « no previous file | src/core/SkPicturePlayback.cpp » ('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 #ifndef SkPicturePlayback_DEFINED 8 #ifndef SkPicturePlayback_DEFINED
9 #define SkPicturePlayback_DEFINED 9 #define SkPicturePlayback_DEFINED
10 10
11 #include "SkPictureFlat.h" // for DrawType 11 #include "SkPictureFlat.h" // for DrawType
12 #include "SkPictureStateTree.h"
12 13
13 class SkBitmap; 14 class SkBitmap;
14 class SkCanvas; 15 class SkCanvas;
15 class SkDrawPictureCallback; 16 class SkDrawPictureCallback;
16 class SkPaint; 17 class SkPaint;
17 class SkPictureData; 18 class SkPictureData;
18 19
19 class SkPicturePlayback : SkNoncopyable { 20 class SkPicturePlayback : SkNoncopyable {
20 public: 21 public:
21 SkPicturePlayback(const SkPicture* picture) 22 SkPicturePlayback(const SkPicture* picture)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 bool fUseBBH; 91 bool fUseBBH;
91 PlaybackReplacements* fReplacements; 92 PlaybackReplacements* fReplacements;
92 93
93 void handleOp(SkReader32* reader, 94 void handleOp(SkReader32* reader,
94 DrawType op, 95 DrawType op,
95 uint32_t size, 96 uint32_t size,
96 SkCanvas* canvas, 97 SkCanvas* canvas,
97 const SkMatrix& initialMatrix); 98 const SkMatrix& initialMatrix);
98 99
100 const SkPicture::OperationList* getActiveOps(const SkCanvas* canvas);
101 bool initIterator(SkPictureStateTree::Iterator* iter,
102 SkCanvas* canvas,
103 const SkPicture::OperationList *activeOpsList);
104 static void StepIterator(SkPictureStateTree::Iterator* iter, SkReader32* rea der);
105 static void SkipIterTo(SkPictureStateTree::Iterator* iter,
106 SkReader32* reader, uint32_t skipTo);
107 bool replaceOps(SkPictureStateTree::Iterator* iter,
108 SkReader32* reader,
109 SkCanvas* canvas,
110 const SkMatrix& initialMatrix);
111
99 static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size); 112 static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size);
100 113
101 class AutoResetOpID { 114 class AutoResetOpID {
102 public: 115 public:
103 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { } 116 AutoResetOpID(SkPicturePlayback* playback) : fPlayback(playback) { }
104 ~AutoResetOpID() { 117 ~AutoResetOpID() {
105 if (NULL != fPlayback) { 118 if (NULL != fPlayback) {
106 fPlayback->resetOpID(); 119 fPlayback->resetOpID();
107 } 120 }
108 } 121 }
109 122
110 private: 123 private:
111 SkPicturePlayback* fPlayback; 124 SkPicturePlayback* fPlayback;
112 }; 125 };
113 126
114 private: 127 private:
115 typedef SkNoncopyable INHERITED; 128 typedef SkNoncopyable INHERITED;
116 }; 129 };
117 130
118 #endif 131 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698