| Index: src/core/SkScaledImageCache.h
|
| diff --git a/src/core/SkScaledImageCache.h b/src/core/SkScaledImageCache.h
|
| index fe072306d383f44eec7554724f4c3d8b94ae9fdf..d2f31d68b161a52dcdf97b99543a3c2a50f7929d 100644
|
| --- a/src/core/SkScaledImageCache.h
|
| +++ b/src/core/SkScaledImageCache.h
|
| @@ -64,6 +64,9 @@ public:
|
| static size_t GetByteLimit();
|
| static size_t SetByteLimit(size_t newLimit);
|
|
|
| + static size_t SetSingleAllocationByteLimit(size_t);
|
| + static size_t GetSingleAllocationByteLimit();
|
| +
|
| static SkBitmap::Allocator* GetAllocator();
|
|
|
| /**
|
| @@ -148,6 +151,13 @@ public:
|
| size_t getByteLimit() const { return fByteLimit; }
|
|
|
| /**
|
| + * This is respected by SkBitmapProcState::possiblyScaleImage.
|
| + * 0 is no maximum at all; this is the default.
|
| + * setSingleAllocationByteLimit() returns the previous value.
|
| + */
|
| + size_t setSingleAllocationByteLimit(size_t maximumAllocationSize);
|
| + size_t getSingleAllocationByteLimit() const;
|
| + /**
|
| * Set the maximum number of bytes available to this cache. If the current
|
| * cache exceeds this new value, it will be purged to try to fit within
|
| * this new limit.
|
| @@ -177,6 +187,7 @@ private:
|
|
|
| size_t fBytesUsed;
|
| size_t fByteLimit;
|
| + size_t fSingleAllocationByteLimit;
|
| int fCount;
|
|
|
| Rec* findAndLock(uint32_t generationID, SkScalar sx, SkScalar sy,
|
|
|