Chromium Code Reviews| Index: include/core/SkPicture.h |
| diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h |
| index c4c6f20326455f7f102f9ed8f833e3f9c85eb1d3..b26d97f39f93abe335fabf0af2805be828a42c6d 100644 |
| --- a/include/core/SkPicture.h |
| +++ b/include/core/SkPicture.h |
| @@ -259,11 +259,13 @@ private: |
| void createHeader(SkPictInfo* info) const; |
| static bool IsValidPictInfo(const SkPictInfo& info); |
| - // Takes ownership of the SkRecord, refs the (optional) BBH. |
| - SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*); |
| + // Takes ownership of the SkRecord, refs the (optional) drawablePicts and BBH. |
| + SkPicture(SkScalar width, SkScalar height, SkRecord*, SkData* drawablePicts, |
|
mtklein
2014/11/18 01:07:06
I'm still weirded out by passing this as SkData, b
|
| + SkBBoxHierarchy*); |
| static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
| - static SkPictureData* Backport(const SkRecord&, const SkPictInfo&); |
| + static SkPictureData* Backport(const SkRecord&, const SkPictInfo&, |
| + SkPicture* const drawablePics[], int drawableCount); |
|
mtklein
2014/11/18 01:07:06
What type are we after here?
1) Array of const
|
| const SkScalar fCullWidth; |
| const SkScalar fCullHeight; |
| @@ -271,6 +273,15 @@ private: |
| mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed |
| SkAutoTDelete<SkRecord> fRecord; |
| SkAutoTUnref<SkBBoxHierarchy> fBBH; |
| + SkAutoTUnref<SkData> fDrawablePicts; |
| + |
| + // helpers for fDrawablePicts |
| + int drawableCount() const; |
| + // will return NULL if drawableCount() returns 0 |
| + SkPicture* const* drawablePicts() const; |
| + |
| + struct PathCounter; |
| + |
| struct Analysis { |
| Analysis() {} // Only used by SkPictureData codepath. |
| explicit Analysis(const SkRecord&); |
| @@ -287,8 +298,6 @@ private: |
| } fAnalysis; |
| mutable uint32_t fUniqueID; |
| - struct PathCounter; |
| - |
| friend class SkPictureRecorder; // SkRecord-based constructor. |
| friend class GrLayerHoister; // access to fRecord |
| friend class ReplaceDraw; |