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

Unified Diff: src/core/SkPictureStateTree.h

Issue 261663003: First pass at pre-rendering saveLayers for GPU (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Reduce size of PlaybackReplacements in SkPicturePlayback.h Created 6 years, 7 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
===================================================================
--- src/core/SkPictureStateTree.h (revision 14614)
+++ src/core/SkPictureStateTree.h (working copy)
@@ -74,8 +74,29 @@
*/
class Iterator {
public:
- /** Returns the next offset into the picture stream, or kDrawComplete if complete. */
+ /** Returns the next op offset needed to create the drawing state
+ required by the queued up draw operation or the offset of the queued
+ up draw operation itself. In the latter case, the next draw operation
+ will move into the queued up slot.
+ It retuns kDrawComplete when done.
+ TODO: this might be better named nextOp
+ */
uint32_t nextDraw();
+ /** Peek at the currently queued up draw op's offset. Note that this can
+ be different then what 'nextDraw' would return b.c. it is
+ the offset of the next _draw_ op while 'nextDraw' can return
+ the offsets to saveLayer and clip ops while it is creating the proper
+ drawing context for the queued up draw op.
+ */
+ uint32_t peekDraw();
+ /** Stop trying to create the drawing context for the currently queued
+ up _draw_ operation and queue up the next one. This call returns
+ the offset of the skipped _draw_ operation. Obviously (since the
+ correct drawing context has not been established), the skipped
+ _draw_ operation should not be issued. Returns kDrawComplete if
+ the end of the draw operations is reached.
+ */
+ uint32_t skipDraw();
static const uint32_t kDrawComplete = SK_MaxU32;
Iterator() : fPlaybackMatrix(), fValid(false) { }
bool isValid() const { return fValid; }
@@ -111,6 +132,8 @@
// Whether or not this is a valid iterator (the default public constructor sets this false)
bool fValid;
+ uint32_t finish();
+
friend class SkPictureStateTree;
};
« 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