From b7cd5163b0e75e3253c8560a71016635fe5e8e81 Mon Sep 17 00:00:00 2001 From: "ccameron@chromium.org" Date: Tue, 13 Nov 2012 21:15:45 +0000 Subject: 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 --- .../common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content/common') 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( -- cgit v1.1