aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-03 17:58:27 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-03 17:58:27 +0000
commit1942c05e9c51b462355626155c1bdc3fc43161cf (patch)
treeb0a24c9ff844387fe546bb1c50b58164fcf5ead0 /src/gpu/gl/GrGpuGL.cpp
parent58b381841cb8d234d09c85af43720cbff00e6212 (diff)
Fixed texture ref/unref bug in GrInOrderDrawBuffer/GrDrawState
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 3b5fffe7ef..a06b0084aa 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2102,7 +2102,7 @@ bool GrGpuGL::flushGLStateCommon(GrPrimitiveType type) {
// true for now, but maybe not with GrEffect.
GrAssert(NULL != nextTexture);
// if we created a rt/tex and rendered to it without using a
- // texture and now we're texuring from the rt it will still be
+ // texture and now we're texturing from the rt it will still be
// the last bound texture, but it needs resolving. So keep this
// out of the "last != next" check.
GrGLRenderTarget* texRT =
@@ -2239,6 +2239,8 @@ bool GrGpuGL::flushGLStateCommon(GrPrimitiveType type) {
// relies on detecting when the kModifyStencilClip_StateBit state has
// changed since the last draw.
fHWDrawState.copyStateFlags(*drawState);
+ // only GrInOrderDrawBuffer ever needs to ref/unref the textures
+ fHWDrawState.disableState(GrDrawState::kTexturesNeedRef_StateBit);
return true;
}