| Index: src/core/SkMipMap.cpp
|
| diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp
|
| index 032a60d0f1f6b420cc674b389f0ae7db8f178cb7..69c58547af6b20de53a46c8eb246c2aa6d01d619 100644
|
| --- a/src/core/SkMipMap.cpp
|
| +++ b/src/core/SkMipMap.cpp
|
| @@ -351,3 +351,23 @@ bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const {
|
| }
|
| return true;
|
| }
|
| +
|
| +int SkMipMap::getLevelsCount() const {
|
| + return fCount;
|
| +}
|
| +
|
| +bool SkMipMap::getLevel(int levelIndex, Level* levelPtr) const {
|
| + if (NULL == fLevels) {
|
| + return false;
|
| + }
|
| + if (levelIndex <= 0) {
|
| + return false;
|
| + }
|
| + if (levelIndex > fCount) {
|
| + levelIndex = fCount;
|
| + }
|
| + if (levelPtr) {
|
| + *levelPtr = fLevels[levelIndex - 1];
|
| + }
|
| + return true;
|
| +}
|
|
|