aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGLTexture.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-12-23 16:53:57 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-12-23 16:53:57 +0000
commitda96ea01fe2a7f4237712c68fae2b96d3523b0f5 (patch)
treedd4de5853fb9c278a5121d49baa16a3742dedd5b /gpu/src/GrGLTexture.cpp
parentf3c1cc906391f5cb5179ee49c7fcaba8f9e6e5cc (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/src/GrGLTexture.cpp')
-rw-r--r--gpu/src/GrGLTexture.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index b75cad5ec0..4e9d9223de 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -75,12 +75,14 @@ const GLenum GrGLTexture::gWrapMode2GLWrap[] = {
GrGLTexture::GrGLTexture(const GLTextureDesc& textureDesc,
const GLRenderTargetIDs& rtIDs,
+ const TexParams& initialTexParams,
GrGpuGL* gl) :
INHERITED(textureDesc.fContentWidth,
textureDesc.fContentHeight,
textureDesc.fAllocWidth,
textureDesc.fAllocHeight,
textureDesc.fFormat),
+ fTexParams(initialTexParams),
fTextureID(textureDesc.fTextureID),
fUploadFormat(textureDesc.fUploadFormat),
fUploadByteCount(textureDesc.fUploadByteCount),
@@ -101,15 +103,6 @@ GrGLTexture::GrGLTexture(const GLTextureDesc& textureDesc,
(int32_t)textureDesc.fContentHeight;
fRenderTarget = new GrGLRenderTarget(rtIDs, vp, this, gl);
}
-
- fSamplerState.setClampNoFilter();
-
- GR_GL(BindTexture(GL_TEXTURE_2D, fTextureID));
- gl->notifyTextureBind(this);
- GR_GL(TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
- GR_GL(TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
- GR_GL(TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
- GR_GL(TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
}
GrGLTexture::~GrGLTexture() {
@@ -124,7 +117,7 @@ GrGLTexture::~GrGLTexture() {
void GrGLTexture::abandon() {
fTextureID = 0;
if (NULL != fRenderTarget) {
- fRenderTarget->abandon();
+ fRenderTarget->abandon();
}
}