Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/core/SkScaledImageCache.h

Issue 37343002: Allow SkLazyPixelRef to use SkScaledImageCache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: again Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkScaledImageCache.h
diff --git a/src/core/SkScaledImageCache.h b/src/core/SkScaledImageCache.h
index 32474b7f61013943ec6a1bd6ce741d8184f20aa1..37f7c3fd04add8590cd429e5f1e5cacce93d55d8 100644
--- a/src/core/SkScaledImageCache.h
+++ b/src/core/SkScaledImageCache.h
@@ -31,10 +31,21 @@ public:
* instance of this cache.
*/
+ static ID* FindAndLock(uint32_t pixelGenerationID,
reed1 2013/10/24 21:07:04 Probably could use a simple comment... // Called
hal.canary 2013/10/25 16:37:10 Done.
+ int32_t width,
+ int32_t height,
+ SkBitmap* scaled);
reed1 2013/10/24 21:07:04 slightly confusing to call this 'scaled'. How abou
hal.canary 2013/10/25 16:37:10 Done.
+
static ID* FindAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, SkBitmap* scaled);
static ID* FindAndLockMip(const SkBitmap& original, SkMipMap const**);
+
+ static ID* AddAndLock(uint32_t pixelGenerationID,
+ int32_t width,
+ int32_t height,
+ const SkBitmap& scaled);
+
static ID* AddAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, const SkBitmap& scaled);
static ID* AddAndLockMip(const SkBitmap& original, const SkMipMap*);
@@ -58,6 +69,11 @@ public:
* If a match is not found, scaled will be unmodifed, and NULL will be
* returned.
*/
+ ID* findAndLock(uint32_t pixelGenerationID,
+ int32_t width,
+ int32_t height,
+ SkBitmap* scaled);
+
ID* findAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, SkBitmap* scaled);
ID* findAndLockMip(const SkBitmap& original, SkMipMap const**);
@@ -66,6 +82,10 @@ public:
* To add a new (scaled) bitmap to the cache, call AddAndLock. Use the
* returned ptr to unlock the cache when you are done using scaled.
*/
+ ID* addAndLock(uint32_t pixelGenerationID,
+ int32_t width,
+ int32_t height,
+ const SkBitmap& scaled);
ID* addAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, const SkBitmap& scaled);
ID* addAndLockMip(const SkBitmap& original, const SkMipMap*);
@@ -115,5 +135,4 @@ private:
void validate() const {}
#endif
};
-
#endif
« no previous file with comments | « gyp/tests.gyp ('k') | src/core/SkScaledImageCache.cpp » ('j') | src/core/SkScaledImageCache.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698