summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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(