| Index: src/core/SkBitmapCache.h
|
| diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h
|
| index 2b2dfbbea44060d51791156f9819c330835a5645..74e854635313c6ccb2dce4cd36132b9459f7cb0c 100644
|
| --- a/src/core/SkBitmapCache.h
|
| +++ b/src/core/SkBitmapCache.h
|
| @@ -9,17 +9,26 @@
|
| #define SkBitmapCache_DEFINED
|
|
|
| #include "SkScalar.h"
|
| +#include "SkBitmap.h"
|
|
|
| -class SkBitmap;
|
| class SkMipMap;
|
|
|
| class SkBitmapCache {
|
| public:
|
| /**
|
| + * Use this allocator for bitmaps, so they can use ashmem when available.
|
| + */
|
| + static SkBitmap::Allocator* GetAllocator();
|
| +
|
| + /**
|
| * 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);
|
| +
|
| + /*
|
| + * result must be marked isImmutable()
|
| + */
|
| static void Add(const SkBitmap& src, SkScalar invScaleX, SkScalar invScaleY,
|
| const SkBitmap& result);
|
|
|
| @@ -28,6 +37,10 @@ public:
|
| * result will be set to the matching bitmap with its pixels already locked.
|
| */
|
| static bool Find(uint32_t genID, int width, int height, SkBitmap* result);
|
| +
|
| + /*
|
| + * result must be marked isImmutable()
|
| + */
|
| static void Add(uint32_t genID, int width, int height, const SkBitmap& result);
|
| };
|
|
|
|
|