Chromium Code Reviews| Index: src/core/SkMipMap.h |
| diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h |
| index bc6d154939a44c58cd4f0d3b8aa625f18ccfc5b8..51ceda5feb1c7c5f1de468384832efbbd4fd58ee 100644 |
| --- a/src/core/SkMipMap.h |
| +++ b/src/core/SkMipMap.h |
| @@ -23,12 +23,18 @@ public: |
| static SkMipMap* Build(const SkPixmap& src, SkDiscardableFactoryProc); |
| static SkMipMap* Build(const SkBitmap& src, SkDiscardableFactoryProc); |
| + // This function lets you determine how many levels a mipmap will have without |
| + // creating that mipmap. |
| + static int ComputeLevelCount(int baseWidth, int baseHeight); |
|
reed1
2016/02/05 22:37:11
Its odd that this returns a different value (+1) f
cblume
2016/02/06 13:38:16
Done.
|
| + |
| struct Level { |
| SkPixmap fPixmap; |
| SkSize fScale; // < 1.0 |
| }; |
| bool extractLevel(SkScalar scale, Level*) const; |
| + int countLevels() const; |
| + void getLevel(int index, Level*) const; |
| protected: |
| void onDataChange(void* oldData, void* newData) override { |