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

Unified Diff: src/core/SkBitmapCache.h

Issue 576763002: allow SkBitmapCache to operate on a local instance, for testability (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use __VA_ARGS__ explicitly to make MSVC happy Created 6 years, 3 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
« no previous file with comments | « no previous file | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapCache.h
diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h
index aec7a7d41cb6fd906e2eb2a458460bd5f6152701..181c85812aa86ae8e14fb7d66b54af5c700b59ce 100644
--- a/src/core/SkBitmapCache.h
+++ b/src/core/SkBitmapCache.h
@@ -11,6 +11,7 @@
#include "SkScalar.h"
#include "SkBitmap.h"
+class SkResourceCache;
class SkMipMap;
class SkBitmapCache {
@@ -25,25 +26,28 @@ public:
* Search based on the src bitmap and inverse scales in X and Y. If found, returns true and
* result will be set to the matching bitmap with its pixels already locked.
*/
- static bool Find(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY, SkBitmap* result);
+ static bool Find(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY, SkBitmap* result,
+ SkResourceCache* localCache = NULL);
/*
* result must be marked isImmutable()
*/
static void Add(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY,
- const SkBitmap& result);
+ const SkBitmap& result, SkResourceCache* localCache = NULL);
/**
* Search based on the bitmap's genID and subset. If found, returns true and
* result will be set to the matching bitmap with its pixels already locked.
*/
- static bool Find(uint32_t genID, const SkIRect& subset, SkBitmap* result);
+ static bool Find(uint32_t genID, const SkIRect& subset, SkBitmap* result,
+ SkResourceCache* localCache = NULL);
/**
* The width and the height of the provided subset must be the same as the result bitmap ones.
* result must be marked isImmutable()
*/
- static bool Add(uint32_t genID, const SkIRect& subset, const SkBitmap& result);
+ static bool Add(uint32_t genID, const SkIRect& subset, const SkBitmap& result,
+ SkResourceCache* localCache = NULL);
};
class SkMipMapCache {
« no previous file with comments | « no previous file | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698