O(1) SkPictureUtils::ApproxBytesUsed()
authormtklein <mtklein@chromium.org>
Tue, 21 Apr 2015 22:23:59 +0000 (15:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 21 Apr 2015 22:24:00 +0000 (15:24 -0700)
commit98b8485a4cc911420e20af2670d21a5478a06264
tree4a2fa7f3eba5368bd32656d4e1cffdfa8287f870
parent5ae0e2b56373b67a0fe6a0f9d7a0373712d1fa63
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
include/core/SkPicture.h
src/core/SkPicture.cpp
src/core/SkPictureRecorder.cpp
src/core/SkRecorder.cpp
src/core/SkRecorder.h
src/core/SkVarAlloc.cpp
src/core/SkVarAlloc.h
src/utils/SkPictureUtils.cpp
tests/PictureTest.cpp