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

Unified Diff: include/core/SkPicture.h

Issue 727363003: wip for drawables (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make the pictures in the array also const (the array already was const) Created 6 years, 1 month 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 | « no previous file | samplecode/SampleArc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPicture.h
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index c4c6f20326455f7f102f9ed8f833e3f9c85eb1d3..99bca367d987c4d3ca237580b4c9e5b51c73c0b8 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,
+ SkBBoxHierarchy*);
static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
- static SkPictureData* Backport(const SkRecord&, const SkPictInfo&);
+ static SkPictureData* Backport(const SkRecord&, const SkPictInfo&,
+ SkPicture const* const drawablePics[], int drawableCount);
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* 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;
« no previous file with comments | « no previous file | samplecode/SampleArc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698