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

Unified Diff: include/core/SkPicture.h

Issue 725143002: More SkPicture cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: newlines 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 | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkPicture.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 4bef2b0d2f88a0541813eec4f585e300a7728c28..c4c6f20326455f7f102f9ed8f833e3f9c85eb1d3 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -24,7 +24,6 @@ class SkBBoxHierarchy;
class SkCanvas;
class SkData;
class SkPictureData;
-class SkPictureRecord;
class SkStream;
class SkWStream;
@@ -254,47 +253,24 @@ private:
static const uint32_t MIN_PICTURE_VERSION = 19;
static const uint32_t CURRENT_PICTURE_VERSION = 37;
- mutable uint32_t fUniqueID;
-
- SkAutoTDelete<const SkPictureData> fData;
- const SkScalar fCullWidth;
- const SkScalar fCullHeight;
- mutable SkAutoTUnref<const AccelData> fAccelData;
-
- mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed
-
void needsNewGenID() { fUniqueID = SK_InvalidGenID; }
void callDeletionListeners();
- // Create a new SkPicture from an existing SkPictureData. The new picture
- // takes ownership of 'data'.
- SkPicture(SkPictureData* data, SkScalar width, SkScalar height);
-
- SkPicture(SkScalar width, SkScalar height, const SkPictureRecord& record, bool deepCopyOps);
-
void createHeader(SkPictInfo* info) const;
static bool IsValidPictInfo(const SkPictInfo& info);
- friend class SkPictureRecorder; // SkRecord-based constructor.
- friend class SkGpuDevice; // for fData access
- friend class GrLayerHoister; // access to fRecord
- friend class SkPicturePlayback; // to get fData
- friend class ReplaceDraw;
-
- typedef SkRefCnt INHERITED;
-
// Takes ownership of the SkRecord, refs the (optional) BBH.
SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*);
- // Return as a new SkPicture that's backed by SkRecord.
- static SkPicture* Forwardport(const SkPicture&);
- // Return as a new SkPicture that's backed by the old backend.
- static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect);
+ static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
+ static SkPictureData* Backport(const SkRecord&, const SkPictInfo&);
+
+ const SkScalar fCullWidth;
+ const SkScalar fCullHeight;
+ mutable SkAutoTUnref<const AccelData> fAccelData;
+ mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed
SkAutoTDelete<SkRecord> fRecord;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
-
- struct PathCounter;
-
struct Analysis {
Analysis() {} // Only used by SkPictureData codepath.
explicit Analysis(const SkRecord&);
@@ -309,6 +285,15 @@ private:
int fNumAAHairlineConcavePaths;
int fNumAADFEligibleConcavePaths;
} fAnalysis;
+ mutable uint32_t fUniqueID;
+
+ struct PathCounter;
+
+ friend class SkPictureRecorder; // SkRecord-based constructor.
+ friend class GrLayerHoister; // access to fRecord
+ friend class ReplaceDraw;
+
+ typedef SkRefCnt INHERITED;
};
#endif
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698