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

Unified Diff: src/core/SkMipMap.h

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Refactoring the mipmap level count out. Cleaning includes. 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
Index: src/core/SkMipMap.h
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
index b3e958d63c6f7e921ed7ee758283cc6d2e596fd9..e91f1c7280d9dd31e08ecac104257537c73f4f9d 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -28,6 +28,11 @@ public:
};
bool extractLevel(SkScalar scale, Level*) const;
+ int getLevelsCount() const;
+ // getLevel() is 1-indexed because the SkMipMap contains the generated
reed1 2016/01/22 16:29:13 All of skia's other apis are zero-based for indice
Chris Blume 2016/01/25 08:18:00 Done.
+ // mipmaps, which does not include the base level (which is normally
+ // mipmap level 0). SkMipMap contains mipmap levels 1-x, not 0-x.
+ bool getLevel(int levelIndex, Level* levelPtr) const;
protected:
void onDataChange(void* oldData, void* newData) override {
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/core/SkMipMap.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698