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
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
index f8753cd..ed912ba 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -21,23 +21,21 @@
         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);
 };