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

Unified Diff: src/core/SkPictureStateTree.h

Issue 246893005: Refactor SkPictureStateTree::Iterator to avoid use of kClip_SaveFlag. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments. Created 6 years, 8 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 448c0d31ce521651421afff0df290abc9b3551e3..d61bf032cb89f6241578e9e19bfb769a2f8366e3 100644
--- a/src/core/SkPictureStateTree.h
+++ b/src/core/SkPictureStateTree.h
@@ -75,12 +75,16 @@ public:
class Iterator {
public:
/** Returns the next offset into the picture stream, or kDrawComplete if complete. */
- uint32_t draw();
+ uint32_t nextDraw();
static const uint32_t kDrawComplete = SK_MaxU32;
Iterator() : fPlaybackMatrix(), fValid(false) { }
bool isValid() const { return fValid; }
+
private:
Iterator(const SkTDArray<void*>& draws, SkCanvas* canvas, Node* root);
+
+ void setCurrentMatrix(const SkMatrix*);
+
// The draws this iterator is associated with
const SkTDArray<void*>* fDraws;
@@ -97,7 +101,7 @@ public:
const SkMatrix fPlaybackMatrix;
// Cache of current matrix, so we can avoid redundantly setting it
- SkMatrix* fCurrentMatrix;
+ const SkMatrix* fCurrentMatrix;
// current position in the array of draws
int fPlaybackIndex;
« 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