diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-26 16:36:04 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-26 16:36:04 +0000 |
commit | cffff79a40bd7672e13b31b9801a3f3cda64875e (patch) | |
tree | fac5fe8f4170e8eb7b28dfbe5fe601aaebb9adc9 /include/gpu | |
parent | 0f48ee0a07aa50ab60bfff3c2718b9649e3639ea (diff) |
get genmipmap function in the struct
BUG=
R=bsalomon@google.com, reed@google.com
Author: humper@google.com
Review URL: https://chromiumcodereview.appspot.com/20436002
git-svn-id: http://skia.googlecode.com/svn/trunk@10393 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrTexture.h | 13 | ||||
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 1 | ||||
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h index a87081820f..acb7ade0a8 100644 --- a/include/gpu/GrTexture.h +++ b/include/gpu/GrTexture.h @@ -43,6 +43,14 @@ public: bool isSetFlag(GrTextureFlags flags) const { return 0 != (fDesc.fFlags & flags); } + + void dirtyMipMaps(bool mipMapsDirty) { + fMipMapsDirty = mipMapsDirty; + } + + bool mipMapsAreDirty() const { + return fMipMapsDirty; + } /** * Approximate number of bytes used by the texture @@ -136,7 +144,8 @@ protected: GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) : INHERITED(gpu, isWrapped, desc) - , fRenderTarget(NULL) { + , fRenderTarget(NULL) + , fMipMapsDirty(true) { // only make sense if alloc size is pow2 fShiftFixedX = 31 - SkCLZ(fDesc.fWidth); @@ -155,6 +164,8 @@ private: // for this texture if the texture is power of two sized. int fShiftFixedX; int fShiftFixedY; + + bool fMipMapsDirty; virtual void internal_dispose() const SK_OVERRIDE; diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index c29c14f161..b30ef3ad4d 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -94,6 +94,7 @@ extern "C" { typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLFrontFaceProc)(GrGLenum mode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenBuffersProc)(GrGLsizei n, GrGLuint* buffers); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenFramebuffersProc)(GrGLsizei n, GrGLuint *framebuffers); + typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenerateMipmapProc)(GrGLenum target); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenQueriesProc)(GrGLsizei n, GrGLuint *ids); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenRenderbuffersProc)(GrGLsizei n, GrGLuint *renderbuffers); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGenTexturesProc)(GrGLsizei n, GrGLuint* textures); diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index 6cc8e17f41..6a51adceea 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -189,6 +189,7 @@ public: GLPtr<GrGLFrontFaceProc> fFrontFace; GLPtr<GrGLGenBuffersProc> fGenBuffers; GLPtr<GrGLGenFramebuffersProc> fGenFramebuffers; + GLPtr<GrGLGenerateMipmapProc> fGenerateMipmap; GLPtr<GrGLGenQueriesProc> fGenQueries; GLPtr<GrGLGenRenderbuffersProc> fGenRenderbuffers; GLPtr<GrGLGenTexturesProc> fGenTextures; |