diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-26 20:03:32 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-26 20:03:32 +0000 |
commit | 15011ee5e4068ab6523e432e435473a822ee7d80 (patch) | |
tree | d11ca1c26161dc2af036d95c0eeab50eeacae1ac /include/pipe | |
parent | 1c31f633232df572f89a3bc1b0fee3e46d22cb5b (diff) |
Make SkDeferredCanvas query SkGPipeWriter for space allocated for bitmaps.
SkGPipe now has a method to report how much memory is used for its shared heap.
BUG=http://code.google.com/p/skia/issues/detail?id=738
TEST=DeferredCanvasTest
Review URL: https://codereview.appspot.com/6445046
git-svn-id: http://skia.googlecode.com/svn/trunk@4791 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pipe')
-rw-r--r-- | include/pipe/SkGPipe.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/pipe/SkGPipe.h b/include/pipe/SkGPipe.h index 878b69330a..d06148c662 100644 --- a/include/pipe/SkGPipe.h +++ b/include/pipe/SkGPipe.h @@ -89,7 +89,7 @@ public: * in spite of being cross process, it will have shared address space * with the reader, so the two can share large objects (like SkBitmaps) */ - kSharedAddressSpace_SkGPipeFlag = 1 << 1 + kSharedAddressSpace_Flag = 1 << 1 }; SkCanvas* startRecording(SkGPipeController*, uint32_t flags = 0); @@ -106,9 +106,17 @@ public: */ void flushRecording(bool detachCurrentBlock); + /** + * Return the amount of bytes being used for recording. Note that this + * does not include the amount of storage written to the stream, which is + * controlled by the SkGPipeController. + * Currently only returns the amount used for SkBitmaps, since they are + * potentially unbounded (if the client is not calling playback). + */ + size_t storageAllocatedForRecording(); + private: class SkGPipeCanvas* fCanvas; - SkGPipeController* fController; SkFactorySet fFactorySet; SkWriter32 fWriter; }; |