diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-12-23 16:53:57 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2010-12-23 16:53:57 +0000 |
commit | da96ea01fe2a7f4237712c68fae2b96d3523b0f5 (patch) | |
tree | dd4de5853fb9c278a5121d49baa16a3742dedd5b /gpu/include | |
parent | f3c1cc906391f5cb5179ee49c7fcaba8f9e6e5cc (diff) |
Stop using GrSamplerState to track the texture parameters for GL textures. It has become larger and now holds state that isn't tracked per-texture by GL. Also remove unused setSamplerStateImm from GrGpuGL
git-svn-id: http://skia.googlecode.com/svn/trunk@659 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include')
-rw-r--r-- | gpu/include/GrGLTexture.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gpu/include/GrGLTexture.h b/gpu/include/GrGLTexture.h index ada31512f5..165320fd55 100644 --- a/gpu/include/GrGLTexture.h +++ b/gpu/include/GrGLTexture.h @@ -93,13 +93,19 @@ public: kBottomUp_Orientation, kTopDown_Orientation, }; + + struct TexParams { + GLenum fFilter; + GLenum fWrapS; + GLenum fWrapT; + }; protected: struct GLTextureDesc { uint32_t fContentWidth; uint32_t fContentHeight; uint32_t fAllocWidth; - uint32_t fAllocHeight; + uint32_t fAllocHeight; PixelConfig fFormat; GLuint fTextureID; GLenum fUploadFormat; @@ -110,6 +116,7 @@ protected: typedef GrGLRenderTarget::GLRenderTargetIDs GLRenderTargetIDs; GrGLTexture(const GLTextureDesc& textureDesc, const GLRenderTargetIDs& rtIDs, + const TexParams& initialTexParams, GrGpuGL* gl); public: @@ -127,9 +134,8 @@ public: const void* srcData); virtual intptr_t getTextureHandle(); - const GrSamplerState& samplerState() const { return fSamplerState; } - void setSamplerState(const GrSamplerState& state) - { fSamplerState = state; } + const TexParams& getTexParams() const { return fTexParams; } + void setTexParams(const TexParams& texParams) { fTexParams = texParams; } GLuint textureID() const { return fTextureID; } GLenum uploadFormat() const { return fUploadFormat; } @@ -147,7 +153,7 @@ public: Orientation orientation() const { return fOrientation; } private: - GrSamplerState fSamplerState; + TexParams fTexParams; GLuint fTextureID; GLenum fUploadFormat; GLenum fUploadByteCount; |