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

Unified Diff: src/core/SkPictureStateTree.h

Issue 12817011: Fixing SkPicture command pattern optimizations to make them work correctly with bounding box hierar… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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/SkPictureRecord.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
===================================================================
--- src/core/SkPictureStateTree.h (revision 8135)
+++ src/core/SkPictureStateTree.h (working copy)
@@ -63,6 +63,13 @@
void appendClip(uint32_t offset);
/**
+ * Call this immediately after an appendRestore call that is associated
+ * a save or saveLayer that was removed from the command stream
+ * due to a command pattern optimization in SkPicture.
+ */
+ void saveCollapsed();
+
+ /**
* Playback helper
*/
class Iterator {
@@ -109,6 +116,10 @@
SkChunkAlloc fAlloc;
Node* fRoot;
+ // Needed by saveCollapsed() because nodes do not currently store
+ // references to their children. If they did, we could just retrieve the
+ // last added child.
+ Node* fLastRestoredNode;
// The currently active state
Draw fCurrentState;
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | src/core/SkPictureStateTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698