diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-15 14:00:23 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-15 14:00:23 +0000 |
commit | cd19a5f194e8032038337758fd806a33d0bda0b0 (patch) | |
tree | 0f8c84e52558944cc25b28f705d6553c283817ae /gpu | |
parent | 38a9134dbced61f7f840be899f405b5c73b07fb3 (diff) |
Set texture dirty flag only when texture has really changed
Review URL: http://codereview.appspot.com/4571073/
git-svn-id: http://skia.googlecode.com/svn/trunk@1592 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/src/GrGpuGL.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp index aa8c6db0cd..177ddb105c 100644 --- a/gpu/src/GrGpuGL.cpp +++ b/gpu/src/GrGpuGL.cpp @@ -1778,6 +1778,9 @@ bool GrGpuGL::flushGLStateCommon(GrPrimitiveType type) { #endif //GrPrintf("---- bindtexture %d\n", nextTexture->textureID()); fHWDrawState.fTextures[s] = nextTexture; + // The texture matrix has to compensate for texture width/height + // and NPOT-embedded-in-POT + fDirtyFlags.fTextureChangedMask |= (1 << s); } const GrSamplerState& sampler = fCurrDrawState.fSamplerStates[s]; @@ -1818,10 +1821,6 @@ bool GrGpuGL::flushGLStateCommon(GrPrimitiveType type) { newTexParams.fWrapT)); } nextTexture->setTexParams(newTexParams); - - // The texture matrix has to compensate for texture width/height - // and NPOT-embedded-in-POT - fDirtyFlags.fTextureChangedMask |= (1 << s); } } |