diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:07:28 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:07:28 +0000 |
commit | 6bfae22b20d5750a722bfe87332a17c53641104c (patch) | |
tree | c14fd5efda900c0814b730d35e0a1c3f025760f2 /gpu | |
parent | 1cabf5eca2cf1e085c8dfcde89bd203a560ae00b (diff) | |
download | chromium_src-6bfae22b20d5750a722bfe87332a17c53641104c.zip chromium_src-6bfae22b20d5750a722bfe87332a17c53641104c.tar.gz chromium_src-6bfae22b20d5750a722bfe87332a17c53641104c.tar.bz2 |
Previously, the DisplayLink would never start until a software draw was done at least once. With force-compositing-mode, the software draw was never done, causing tabs to lockup indefinitely waiting for the swap acknowledgement. This fix ensures that the DisplayLink is running immediately.
The Cocoa setUpGState callback was required to avoid "invalid drawable" errors when setView was called on the NSOpenGLContext.
Another deadlock cause could be the GpuChannel route getting removed while the renderer is blocked on a FlushSync. For this, a method has been added to GpuCommandBufferStub to unblock/cleanup that is called from GpuChannel before the IPC route is removed.
Trace events have been added in places that will help debug related issues in the future.
BUG=84343
TEST=launch with --force-compositing-mode; open about:flags; in the same tab, open ycombinator.com and it should not hang.
Review URL: http://codereview.chromium.org/6993043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gpu_scheduler.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/gpu_scheduler.cc b/gpu/command_buffer/service/gpu_scheduler.cc index 53fcfa2..f6d0607 100644 --- a/gpu/command_buffer/service/gpu_scheduler.cc +++ b/gpu/command_buffer/service/gpu_scheduler.cc @@ -137,7 +137,7 @@ const unsigned int kMaxOutstandingSwapBuffersCallsPerOnscreenContext = 1; #endif void GpuScheduler::PutChanged(bool sync) { - TRACE_EVENT0("gpu", "GpuScheduler:PutChanged"); + TRACE_EVENT1("gpu", "GpuScheduler:PutChanged", "this", this); CommandBuffer::State state = command_buffer_->GetState(); parser_->set_put(state.put_offset); @@ -148,7 +148,7 @@ void GpuScheduler::PutChanged(bool sync) { } void GpuScheduler::ProcessCommands() { - TRACE_EVENT0("gpu", "GpuScheduler:ProcessCommands"); + TRACE_EVENT1("gpu", "GpuScheduler:ProcessCommands", "this", this); CommandBuffer::State state = command_buffer_->GetState(); if (state.error != error::kNoError) return; @@ -173,6 +173,7 @@ void GpuScheduler::ProcessCommands() { if (do_rate_limiting && swap_buffers_count_ - acknowledged_swap_buffers_count_ >= kMaxOutstandingSwapBuffersCallsPerOnscreenContext) { + TRACE_EVENT0("gpu", "EarlyOut_OSX_Throttle"); // Stop doing work on this command buffer. In the GPU process, // receipt of the GpuMsg_AcceleratedSurfaceBuffersSwappedACK // message causes ProcessCommands to be scheduled again. @@ -226,8 +227,9 @@ void GpuScheduler::ProcessCommands() { } void GpuScheduler::SetScheduled(bool scheduled) { - TRACE_EVENT2("gpu", "GpuScheduler:SetScheduled", "scheduled", scheduled, - "unscheduled_count_", unscheduled_count_); + TRACE_EVENT2("gpu", "GpuScheduler:SetScheduled", "this", this, + "new unscheduled_count_", + unscheduled_count_ + (scheduled? -1 : 1)); if (scheduled) { --unscheduled_count_; DCHECK_GE(unscheduled_count_, 0); |