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

Unified Diff: src/core/SkPictureStateTree.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureStateTree.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureStateTree.h
diff --git a/src/core/SkPictureStateTree.h b/src/core/SkPictureStateTree.h
index da51a5b954bf634b1ab47a8f58f5cd5f58655bec..15bb02f354860f4ef871712d2d19789b3c7f65d3 100644
--- a/src/core/SkPictureStateTree.h
+++ b/src/core/SkPictureStateTree.h
@@ -50,11 +50,13 @@ public:
Draw* appendDraw(size_t offset);
/**
- * Given a list of draws, and a canvas, returns an iterator that produces the correct sequence
- * of offsets into the command buffer to carry out those calls with correct matrix/clip state.
- * This handles saves/restores, and does all necessary matrix setup.
+ * Given a list of draws, and a canvas, initialize an iterator that produces the correct
+ * sequence of offsets into the command buffer to carry out those calls with correct
+ * matrix/clip state. This handles saves/restores, and does all necessary matrix setup.
*/
- Iterator getIterator(const SkTDArray<void*>& draws, SkCanvas* canvas);
+ void initIterator(SkPictureStateTree::Iterator* iter,
+ const SkTDArray<void*>& draws,
+ SkCanvas* canvas);
void appendSave();
void appendSaveLayer(size_t offset);
@@ -83,11 +85,11 @@ public:
*/
uint32_t nextDraw();
static const uint32_t kDrawComplete = SK_MaxU32;
- Iterator() : fPlaybackMatrix(), fValid(false) { }
+ Iterator() : fValid(false) { }
bool isValid() const { return fValid; }
private:
- Iterator(const SkTDArray<void*>& draws, SkCanvas* canvas, Node* root);
+ void init(const SkTDArray<void*>& draws, SkCanvas* canvas, Node* root);
void setCurrentMatrix(const SkMatrix*);
@@ -104,7 +106,7 @@ public:
SkTDArray<Node*> fNodes;
// The matrix of the canvas we're playing back into
- const SkMatrix fPlaybackMatrix;
+ SkMatrix fPlaybackMatrix;
// Cache of current matrix, so we can avoid redundantly setting it
const SkMatrix* fCurrentMatrix;
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureStateTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698