aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapCache.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-08-04 08:10:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-04 08:10:13 -0700
commit6f1216ac158e36a3a1cc805e7f899c755c5b98a2 (patch)
tree0e644bea3787fd4c5fcbf20e1e6d121c1692449d /src/core/SkBitmapCache.h
parentfae010266f32b715f334c8680aeada2c72d44668 (diff)
cache private readback for gpu-images
Does not try to cache calls to readPixels at the moment: - not triggered by drawing - not clear if we want to perform any pixel transformations (that readPixels allows) on the GPU or CPU Can consider that another time. BUG=513695 Review URL: https://codereview.chromium.org/1262923003
Diffstat (limited to 'src/core/SkBitmapCache.h')
-rw-r--r--src/core/SkBitmapCache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h
index de50aabe1e..c758942080 100644
--- a/src/core/SkBitmapCache.h
+++ b/src/core/SkBitmapCache.h
@@ -52,6 +52,10 @@ public:
*/
static bool Add(SkPixelRef*, const SkIRect& subset, const SkBitmap& result,
SkResourceCache* localCache = NULL);
+
+ static bool Find(uint32_t genID, SkBitmap* result, SkResourceCache* localCache = NULL);
+ // todo: eliminate the need to specify ID, since it should == the bitmap's
+ static void Add(uint32_t genID, const SkBitmap&, SkResourceCache* localCache = NULL);
};
class SkMipMapCache {