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

Side by Side Diff: src/core/SkMipMap.h

Issue 19462007: pull mipmap class into its own (private) header (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef SkMipMap_DEFINED
tfarina 2013/07/18 21:02:07 copyright
2 #define SkMipMap_DEFINED
3
4 #include "SkRefCnt.h"
5 #include "SkScalar.h"
6
7 class SkBitmap;
8
9 class SkMipMap : public SkRefCnt {
10 public:
11 static SkMipMap* Build(const SkBitmap& src);
12
13 struct Level {
14 void* fPixels;
15 uint32_t fRowBytes;
16 uint32_t fWidth, fHeight;
17 };
18
19 bool extractLevel(SkScalar scale, Level*) const;
20
21 private:
22 Level* fLevels;
23 int fCount;
24
25 // we take ownership of levels, and will free it with sk_free()
26 SkMipMap(Level* levels, int count) : fLevels(levels), fCount(count) {
27 SkASSERT(levels);
28 SkASSERT(count > 0);
29 }
30
31 virtual ~SkMipMap() {
32 sk_free(fLevels);
33 }
34
35 static Level* AllocLevels(int levelCount, size_t pixelSize);
36 };
37
38 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698