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

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

Issue 206853003: Add new experimental API to SkPicture to get "id" of current op (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkPicture.cpp ('k') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkPicturePlayback_DEFINED 8 #ifndef SkPicturePlayback_DEFINED
9 #define SkPicturePlayback_DEFINED 9 #define SkPicturePlayback_DEFINED
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void dumpSize() const; 95 void dumpSize() const;
96 96
97 bool containsBitmaps() const; 97 bool containsBitmaps() const;
98 98
99 #ifdef SK_BUILD_FOR_ANDROID 99 #ifdef SK_BUILD_FOR_ANDROID
100 // Can be called in the middle of playback (the draw() call). WIll abort the 100 // Can be called in the middle of playback (the draw() call). WIll abort the
101 // drawing and return from draw() after the "current" op code is done 101 // drawing and return from draw() after the "current" op code is done
102 void abort() { fAbortCurrentPlayback = true; } 102 void abort() { fAbortCurrentPlayback = true; }
103 #endif 103 #endif
104 104
105 size_t curOpID() const { return fCurOffset; }
106 void resetOpID() { fCurOffset = 0; }
107
105 protected: 108 protected:
106 bool parseStream(SkStream*, const SkPictInfo&, 109 bool parseStream(SkStream*, const SkPictInfo&,
107 SkPicture::InstallPixelRefProc); 110 SkPicture::InstallPixelRefProc);
108 bool parseBuffer(SkReadBuffer& buffer); 111 bool parseBuffer(SkReadBuffer& buffer);
109 #ifdef SK_DEVELOPER 112 #ifdef SK_DEVELOPER
110 virtual bool preDraw(int opIndex, int type); 113 virtual bool preDraw(int opIndex, int type);
111 virtual void postDraw(int opIndex); 114 virtual void postDraw(int opIndex);
112 #endif 115 #endif
113 116
114 void preLoadBitmaps(const SkTDArray<void*>* results); 117 void preLoadBitmaps(const SkTDArray<void*>* results);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 SkTDArray<void*> fOps; 260 SkTDArray<void*> fOps;
258 261
259 private: 262 private:
260 typedef SkPicture::OperationList INHERITED; 263 typedef SkPicture::OperationList INHERITED;
261 }; 264 };
262 265
263 CachedOperationList* fCachedActiveOps; 266 CachedOperationList* fCachedActiveOps;
264 267
265 SkTypefacePlayback fTFPlayback; 268 SkTypefacePlayback fTFPlayback;
266 SkFactoryPlayback* fFactoryPlayback; 269 SkFactoryPlayback* fFactoryPlayback;
270
271 // The offset of the current operation when within the draw method
272 size_t fCurOffset;
273
267 #ifdef SK_BUILD_FOR_ANDROID 274 #ifdef SK_BUILD_FOR_ANDROID
268 SkMutex fDrawMutex; 275 SkMutex fDrawMutex;
269 bool fAbortCurrentPlayback; 276 bool fAbortCurrentPlayback;
270 #endif 277 #endif
271 }; 278 };
272 279
273 #endif 280 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698