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

Unified Diff: src/core/SkMipMap.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/SkBitmapProcState.cpp ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMipMap.h
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
index f8753cdc1b77cb1e59d5145bba1c4018ea579e29..ed912ba976956400f2e49daa89935808dd6f08db 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);
};
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698