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
diff --git a/src/pipe/utils/SamplePipeControllers.h b/src/pipe/utils/SamplePipeControllers.h
index 0bf81c6..715693c 100644
--- a/src/pipe/utils/SamplePipeControllers.h
+++ b/src/pipe/utils/SamplePipeControllers.h
@@ -34,6 +34,7 @@
TiledPipeController(const SkBitmap&, const SkMatrix* initialMatrix = NULL);
virtual ~TiledPipeController() {};
virtual void notifyWritten(size_t bytes) SK_OVERRIDE;
+ virtual int numberOfReaders() const SK_OVERRIDE { return NumberOfTiles; }
private:
enum {
NumberOfTiles = 10