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

Unified Diff: src/core/SkMipMap.h

Issue 1639693002: Adding direct access to SkMipMap levels. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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 bc6d154939a44c58cd4f0d3b8aa625f18ccfc5b8..6b2c6c54d5b944f802a03b547017199c3d1ceb25 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -29,6 +29,8 @@ public:
};
bool extractLevel(SkScalar scale, Level*) const;
+ int countLevels() const;
+ void getLevel(int index, Level*) const;
protected:
void onDataChange(void* oldData, void* newData) override {
@@ -48,4 +50,8 @@ private:
typedef SkCachedData INHERITED;
};
+// This function lets you determine how many levels a mipmap will have without
+// creating that mipmap.
+int SkGetMipMapLevelCount(int baseWidth, int baseHeight);
reed1 2016/01/26 14:25:55 This should be a static method on SkMipMap.. int
cblume 2016/01/26 17:16:53 Done.
+
#endif
« no previous file with comments | « no previous file | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698