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

Unified Diff: include/core/SkPicture.h

Issue 1090943004: O(1) SkPictureUtils::ApproxBytesUsed() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 5 years, 8 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 | « no previous file | 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 8a6216e1aa14092a9ed12b1b9c0c095bb01b2a89..a565e415eb791b4b926baa3be631fbae5c847c79 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -260,7 +260,11 @@ private:
static bool IsValidPictInfo(const SkPictInfo& info);
// Takes ownership of the SkRecord and (optional) SnapshotArray, refs the (optional) BBH.
- SkPicture(const SkRect& cullRect, SkRecord*, SnapshotArray*, SkBBoxHierarchy*);
+ SkPicture(const SkRect& cullRect,
+ SkRecord*,
+ SnapshotArray*,
+ SkBBoxHierarchy*,
+ size_t approxBytesUsedBySubPictures);
static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
static SkPictureData* Backport(const SkRecord&, const SkPictInfo&,
@@ -273,6 +277,7 @@ private:
SkAutoTUnref<const SkRecord> fRecord;
SkAutoTUnref<const SkBBoxHierarchy> fBBH;
SkAutoTDelete<const SnapshotArray> fDrawablePicts;
+ const size_t fApproxBytesUsedBySubPictures;
// helpers for fDrawablePicts
int drawableCount() const;
@@ -302,6 +307,6 @@ private:
friend class SkPictureUtils;
friend class SkRecordedDrawable;
};
-SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
+SK_COMPILE_ASSERT(sizeof(SkPicture) <= 104, SkPictureSize);
#endif
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698