aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/pipe
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 16:10:34 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-17 16:10:34 +0000
commit284bf502c086d8fd4285f475a02e69d500c40219 (patch)
tree5b3b87619111b8448a5a13d7243bc6be93ded6f6 /include/pipe
parent7e4cfbf144af7d530d552946cee2a21d30b9b50f (diff)
Purge bitmaps from SkGPipe's shared heap.
BitmapInfo: Now in SkGPipePriv so it can be accessed by SkGPipeRead. Add the ability to essentially ref count BitmapInfos so that they can be purged to make room in the shared heap for a new one. SkGPipeWrite: Purge the least recently used bitmap if it has already been drawn by all readers. SkGPipeRead: Read the BitmapInfo (instead of the SkBitmap) and decrement its count after drawing. SkGPipeController: Added a method to tell how many readers will be used, so that when purging bitmaps each reader can be accounted for. Review URL: https://codereview.appspot.com/6374065 git-svn-id: http://skia.googlecode.com/svn/trunk@4638 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pipe')
-rw-r--r--include/pipe/SkGPipe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/pipe/SkGPipe.h b/include/pipe/SkGPipe.h
index 3237993251..1fa999b85c 100644
--- a/include/pipe/SkGPipe.h
+++ b/include/pipe/SkGPipe.h
@@ -68,6 +68,7 @@ public:
* bytes will always be a multiple of 4.
*/
virtual void notifyWritten(size_t bytes) = 0;
+ virtual int numberOfReaders() const { return 1; }
};
class SkGPipeWriter {