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

Unified Diff: src/core/SkPictureData.h

Issue 384753004: Cleanup SkPicture* classes a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up 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/SkPicture.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.h
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index efae9748403533d596d7265b7319262e8c5a3089..e4ee86ab8fa3c2a0579b0a54f76b83392be850ac 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -12,6 +12,7 @@
#include "SkPathHeap.h"
#include "SkPicture.h"
#include "SkPictureFlat.h"
+#include "SkPictureStateTree.h"
class SkData;
class SkPictureRecord;
@@ -24,7 +25,6 @@ class SkPaint;
class SkPath;
class SkPictureStateTree;
class SkReadBuffer;
-class SkRegion;
struct SkPictInfo {
enum Flags {
@@ -160,8 +160,7 @@ protected:
bool parseStream(SkStream*, SkPicture::InstallPixelRefProc);
bool parseBuffer(SkReadBuffer& buffer);
-private:
-
+public:
const SkBitmap& getBitmap(SkReader32* reader) const {
const int index = reader->readInt();
if (SkBitmapHeap::INVALID_SLOT == index) {
@@ -192,10 +191,15 @@ private:
return &(*fPaints)[index - 1];
}
- void init();
+ void initIterator(SkPictureStateTree::Iterator* iter,
+ const SkTDArray<void*>& draws,
+ SkCanvas* canvas) const {
+ if (NULL != fStateTree) {
+ fStateTree->initIterator(iter, draws, canvas);
+ }
+ }
#ifdef SK_DEBUG_SIZE
-public:
int size(size_t* sizePtr);
int bitmaps(size_t* size);
int paints(size_t* size);
@@ -241,15 +245,14 @@ public:
GrPixelConfig config, SkScalar dpi) const;
#endif
-private: // these help us with reading/writing
+private:
+ void init();
+
+ // these help us with reading/writing
bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, SkPicture::InstallPixelRefProc);
bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size);
void flattenToBuffer(SkWriteBuffer&) const;
-private:
- friend class SkPicture;
- friend class SkPicturePlayback;
-
// Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_SLOT. This empty
// bitmap allows playback to draw nothing and move on.
SkBitmap fBadBitmap;
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698