aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMipMap.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-24 14:31:33 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-24 14:31:33 +0000
commitd94697c21ae479df4190a1afbf08d85ce244a4ef (patch)
tree3a8170934ed3aa549e0d9a2a3f8eb22f2c9640e7 /src/core/SkMipMap.h
parent58c856a54a75e703aa3c82a0cd4e1affd9bd8ffc (diff)
add mipmaps to scaledimagecache
BUG= Review URL: https://codereview.chromium.org/19789016 git-svn-id: http://skia.googlecode.com/svn/trunk@10305 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkMipMap.h')
-rw-r--r--src/core/SkMipMap.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
index f8753cdc1b..ed912ba976 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -21,23 +21,21 @@ public:
void* fPixels;
uint32_t fRowBytes;
uint32_t fWidth, fHeight;
+ float fScale; // < 1.0
};
bool extractLevel(SkScalar scale, Level*) const;
+ size_t getSize() const { return fSize; }
+
private:
+ size_t fSize;
Level* fLevels;
int fCount;
// we take ownership of levels, and will free it with sk_free()
- SkMipMap(Level* levels, int count) : fLevels(levels), fCount(count) {
- SkASSERT(levels);
- SkASSERT(count > 0);
- }
-
- virtual ~SkMipMap() {
- sk_free(fLevels);
- }
+ SkMipMap(Level* levels, int count, size_t size);
+ virtual ~SkMipMap();
static Level* AllocLevels(int levelCount, size_t pixelSize);
};