Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: gpu/command_buffer/service/gpu_processor_mac.cc

Issue 6076005: Mac: Don't hang gpu process on popup close under certain conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: final touches Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gpu_processor_mac.cc
diff --git a/gpu/command_buffer/service/gpu_processor_mac.cc b/gpu/command_buffer/service/gpu_processor_mac.cc
index 63a894da113f5515a9a31fa6cdec96fd8cd94c98..4d9ba185d2b1cb58918ca56cbc12b7476ef42837 100644
--- a/gpu/command_buffer/service/gpu_processor_mac.cc
+++ b/gpu/command_buffer/service/gpu_processor_mac.cc
@@ -108,6 +108,18 @@ void GPUProcessor::set_acknowledged_swap_buffers_count(
acknowledged_swap_buffers_count_ = acknowledged_swap_buffers_count;
}
+void GPUProcessor::DidDestroySurface() {
+ // When a browser window with a GPUProcessor is closed, the render process
+ // will attempt to finish all GL commands, it will busy-wait on the GPU
+ // process until the command queue is empty. If a paint is pending, the GPU
+ // process won't process any GL commands until the browser sends a paint ack,
+ // but since the browser window is already closed, it will never arrive.
+ // To break this infinite loop, the browser tells the GPU process that the
+ // surface became invalid, which causes the GPU process to not wait for paint
+ // acks.
+ surface_.reset();
+}
+
void GPUProcessor::WillSwapBuffers() {
DCHECK(decoder_.get());
DCHECK(decoder_->GetGLContext());
« chrome/common/gpu_messages_internal.h ('K') | « gpu/command_buffer/service/gpu_processor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698