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

Unified Diff: include/core/SkPicture.h

Issue 749683002: Revert of Add SkNVRefCnt, prune down SkPicture's size (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gm/gmmain.cpp ('k') | include/core/SkRefCnt.h » ('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 dc522a5c9d9229c771041e5c7a1c98bd0fdfc3da..eee1ea840141bf5145e93893ad1824eb1aa38512 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -40,8 +40,10 @@
The SkPicture class records the drawing commands made to a canvas, to
be played back at a later time.
*/
-class SK_API SkPicture : public SkNVRefCnt<SkPicture> {
+class SK_API SkPicture : public SkRefCnt {
public:
+ SK_DECLARE_INST_COUNT(SkPicture)
+
// AccelData provides a base class for device-specific acceleration
// data. It is added to the picture via EXPERIMENTAL_addAccelData.
class AccelData : public SkRefCnt {
@@ -58,6 +60,8 @@
static Domain GenerateDomain();
private:
Key fKey;
+
+ typedef SkRefCnt INHERITED;
};
/** PRIVATE / EXPERIMENTAL -- do not call */
@@ -100,7 +104,7 @@
*/
static SkPicture* CreateFromBuffer(SkReadBuffer&);
- ~SkPicture();
+ virtual ~SkPicture();
/** Replays the drawing commands on the specified canvas. Note that
this has the effect of unfurling this picture into the destination
@@ -263,8 +267,6 @@
static SkPictureData* Backport(const SkRecord&, const SkPictInfo&,
SkPicture const* const drawablePics[], int drawableCount);
- // uint32_t fRefCnt; from SkNVRefCnt<SkPicture>
- mutable uint32_t fUniqueID;
const SkRect fCullRect;
mutable SkAutoTUnref<const AccelData> fAccelData;
mutable SkTDArray<DeletionListener*> fDeletionListeners; // pointers are refed
@@ -293,12 +295,14 @@
int fNumAAHairlineConcavePaths;
int fNumAADFEligibleConcavePaths;
} fAnalysis;
+ mutable uint32_t fUniqueID;
friend class SkPictureRecorder; // SkRecord-based constructor.
friend class GrLayerHoister; // access to fRecord
friend class ReplaceDraw;
friend class SkPictureUtils;
+
+ typedef SkRefCnt INHERITED;
};
-SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
-
-#endif
+
+#endif
« no previous file with comments | « gm/gmmain.cpp ('k') | include/core/SkRefCnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698