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

Unified Diff: src/core/SkScaledImageCache.h

Issue 19789016: add mipmaps to scaledimagecache (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « src/core/SkMipMap.cpp ('k') | src/core/SkScaledImageCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScaledImageCache.h
diff --git a/src/core/SkScaledImageCache.h b/src/core/SkScaledImageCache.h
index 6802043150f684d4ea87f540ea2c30a0e57c702d..417648bdfd6b1b16908e828423b7d7292acf7a4f 100644
--- a/src/core/SkScaledImageCache.h
+++ b/src/core/SkScaledImageCache.h
@@ -10,6 +10,8 @@
#include "SkBitmap.h"
+class SkMipMap;
+
/**
* Cache object for bitmaps (with possible scale in X Y as part of the key).
*
@@ -31,10 +33,12 @@ public:
static ID* FindAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, SkBitmap* scaled);
-
+ static ID* FindAndLockMip(const SkBitmap& original, SkMipMap const**);
+
static ID* AddAndLock(const SkBitmap& original, SkScalar scaleX,
- SkScalar scaleY, const SkBitmap& scaled);
-
+ SkScalar scaleY, const SkBitmap& scaled);
+ static ID* AddAndLockMip(const SkBitmap& original, const SkMipMap*);
+
static void Unlock(ID*);
static size_t GetBytesUsed();
@@ -56,6 +60,7 @@ public:
*/
ID* findAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, SkBitmap* scaled);
+ ID* findAndLockMip(const SkBitmap& original, SkMipMap const**);
/**
* To add a new (scaled) bitmap to the cache, call AddAndLock. Use the
@@ -63,6 +68,7 @@ public:
*/
ID* addAndLock(const SkBitmap& original, SkScalar scaleX,
SkScalar scaleY, const SkBitmap& scaled);
+ ID* addAndLockMip(const SkBitmap& original, const SkMipMap*);
/**
* Given a non-null ID ptr returned by either findAndLock or addAndLock,
@@ -91,6 +97,8 @@ private:
size_t fByteLimit;
int fCount;
+ Rec* findAndLock(const SkBitmap& original, SkScalar sx, SkScalar sy);
+
void purgeAsNeeded();
// linklist management
« no previous file with comments | « src/core/SkMipMap.cpp ('k') | src/core/SkScaledImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698