aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecorder.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-04-21 15:23:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-21 15:24:00 -0700
commit98b8485a4cc911420e20af2670d21a5478a06264 (patch)
tree4a2fa7f3eba5368bd32656d4e1cffdfa8287f870 /src/core/SkRecorder.h
parent5ae0e2b56373b67a0fe6a0f9d7a0373712d1fa63 (diff)
O(1) SkPictureUtils::ApproxBytesUsed()
Chrome wants to call this more often, and it's quite slow today. Seems like this could be clearer if SkPictureUtils::ApproxBytesUsed() were SkPicture::approxBytesUsed(). BUG=chromium:471873 Review URL: https://codereview.chromium.org/1090943004
Diffstat (limited to 'src/core/SkRecorder.h')
-rw-r--r--src/core/SkRecorder.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h
index 6842aece58..d0a992fc08 100644
--- a/src/core/SkRecorder.h
+++ b/src/core/SkRecorder.h
@@ -41,6 +41,8 @@ public:
void reset(SkRecord*, const SkRect& bounds);
+ size_t approxBytesUsedBySubPictures() const { return fApproxBytesUsedBySubPictures; }
+
SkDrawableList* getDrawableList() const { return fDrawableList.get(); }
SkDrawableList* detachDrawableList() { return fDrawableList.detach(); }
@@ -131,8 +133,8 @@ private:
return devBounds;
}
+ size_t fApproxBytesUsedBySubPictures;
SkRecord* fRecord;
-
SkAutoTDelete<SkDrawableList> fDrawableList;
};