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

Unified Diff: src/core/SkMipMap.h

Issue 2018283002: Add getting the size of a given mipmap level. (Closed) Base URL: https://skia.googlesource.com/skia.git@add-mip-levels-to-deferred-texture-image-data
Patch Set: Right shifting instead of dividing. Created 4 years, 7 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 928c12d4369dd0a0e646c0fbe68ee276c373e251..5cb4ea8ce670b30c90eec35455b65befd5c65d0c 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -23,10 +23,12 @@ public:
static SkMipMap* Build(const SkPixmap& src, SkDiscardableFactoryProc);
static SkMipMap* Build(const SkBitmap& src, SkDiscardableFactoryProc);
- // This function lets you determine how many levels a SkMipMap will have without
- // creating that mipmap.
+ // Determines how many levels a SkMipMap will have without creating that mipmap.
static int ComputeLevelCount(int baseWidth, int baseHeight);
+ // Determines the size of a given mipmap level.
+ static SkSize ComputeLevelSize(int baseWidth, int baseHeight, int level);
+
struct Level {
SkPixmap fPixmap;
SkSize fScale; // < 1.0
« 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