summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 21:15:45 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-13 21:15:45 +0000
commitb7cd5163b0e75e3253c8560a71016635fe5e8e81 (patch)
tree4c348fbad9f8b021c03e61d70650219b0c3fa8b9 /content/common
parentc79d6ded0b93b3fbb0bfc31f7d1c2039848083d3 (diff)
downloadchromium_src-b7cd5163b0e75e3253c8560a71016635fe5e8e81.zip
chromium_src-b7cd5163b0e75e3253c8560a71016635fe5e8e81.tar.gz
chromium_src-b7cd5163b0e75e3253c8560a71016635fe5e8e81.tar.bz2
Make sure we don't re-allocate transfer buffers and leave them around when
we're deleting GL resources for a backgrounded tab. BUG=158469 Review URL: https://chromiumcodereview.appspot.com/11360213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index a9ab288..28ce7d3 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -1475,6 +1475,11 @@ void WebGraphicsContext3DCommandBufferImpl::OnMemoryAllocationChanged(
if (memory_allocation_changed_callback_)
memory_allocation_changed_callback_->onMemoryAllocationChanged(
web_allocation);
+
+ // We may have allocated transfer buffers in order to free GL resources in a
+ // backgrounded tab. Re-free the transfer buffers.
+ if (!visible_)
+ gl_->FreeEverything();
}
void WebGraphicsContext3DCommandBufferImpl::setErrorMessageCallback(