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

Issue 6993043: Fix the mac hangup when force-compositing-mode is enabled (Closed)

Created:
9 years, 6 months ago by jbates
Modified:
9 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, Vangelis Kokkevis, stuartmorgan
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88877

Patch Set 1 #

Patch Set 2 : disabled CVDisplayLink code, seems to work #

Total comments: 4

Patch Set 3 : cleanup, etc #

Patch Set 4 : cleanup #

Patch Set 5 : split raf-stall fix #

Total comments: 6

Patch Set 6 : feedback #

Patch Set 7 : . #

Patch Set 8 : DisplayLink back in, hopefully found root cause of bug #

Total comments: 7

Patch Set 9 : fixed up NSView code #

Total comments: 7

Patch Set 10 : comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -57 lines) Patch
M chrome/browser/renderer_host/accelerated_plugin_view_mac.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/accelerated_plugin_view_mac.mm View 1 2 3 4 5 6 7 8 9 11 chunks +97 lines, -45 lines 1 comment Download
M content/common/gpu/gpu_channel.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 1 chunk +17 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.cc View 1 2 3 4 5 4 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
jbates
Just a work in progress, looking for some feedback on the bug fixes. http://codereview.chromium.org/6993043/diff/2001/chrome/browser/renderer_host/render_widget_host_view_mac.mm File ...
9 years, 6 months ago (2011-06-07 16:47:52 UTC) #1
Nico
It's been a while since I looked at the GPU code, so I won't do ...
9 years, 6 months ago (2011-06-07 17:10:29 UTC) #2
jbates
On 2011/06/07 17:10:29, Nico wrote: > It's been a while since I looked at the ...
9 years, 6 months ago (2011-06-07 19:21:54 UTC) #3
nduca
This bugfix really concerns me. We've measured drawView as taking large amounts of time, haven't ...
9 years, 6 months ago (2011-06-08 00:08:34 UTC) #4
jbates
On 2011/06/08 00:08:34, nduca wrote: > This bugfix really concerns me. We've measured drawView as ...
9 years, 6 months ago (2011-06-08 00:24:12 UTC) #5
jbates
On 2011/06/08 00:24:12, jbates wrote: > On 2011/06/08 00:08:34, nduca wrote: > > This bugfix ...
9 years, 6 months ago (2011-06-08 00:39:32 UTC) #6
apatrick_chromium
I don't know about the mac stuff. LGTM for the rest.
9 years, 6 months ago (2011-06-08 01:09:29 UTC) #7
nduca
At a high level, I'm uneasy with ripping out a system that was put in ...
9 years, 6 months ago (2011-06-08 01:10:17 UTC) #8
Nico
On Tue, Jun 7, 2011 at 6:10 PM, <nduca@chromium.org> wrote: > At a high level, ...
9 years, 6 months ago (2011-06-08 01:22:37 UTC) #9
Ken Russell (switch to Gerrit)
On 2011/06/08 01:22:37, Nico wrote: > On Tue, Jun 7, 2011 at 6:10 PM, <mailto:nduca@chromium.org> ...
9 years, 6 months ago (2011-06-08 01:43:06 UTC) #10
nduca
Thanks Ken & Nico. Based on that information, I feel a lot less scared by ...
9 years, 6 months ago (2011-06-08 16:10:37 UTC) #11
Nico
As mentioned above, I'd prefer if this landed during calmer times, for better bisectability. Having ...
9 years, 6 months ago (2011-06-08 16:52:46 UTC) #12
jbates
I'm going to leave it to the more seasoned chromium devs to decide whether its ...
9 years, 6 months ago (2011-06-08 17:54:42 UTC) #13
Ken Russell (switch to Gerrit)
On 2011/06/08 17:54:42, jbates wrote: > I'm going to leave it to the more seasoned ...
9 years, 6 months ago (2011-06-08 18:01:05 UTC) #14
nduca
Force-accel triggering this is not just a stress test. Rather, usually when the browser boots ...
9 years, 6 months ago (2011-06-08 18:38:05 UTC) #15
Nico
On Wed, Jun 8, 2011 at 11:38 AM, <nduca@chromium.org> wrote: > Force-accel triggering this is ...
9 years, 6 months ago (2011-06-08 18:39:59 UTC) #16
jbates
I found what seems to be the root cause of the bug, so I put ...
9 years, 6 months ago (2011-06-10 01:18:17 UTC) #17
Ken Russell (switch to Gerrit)
Nice work tracking this down. It mostly looks great. A couple of minor issues. http://codereview.chromium.org/6993043/diff/17013/chrome/browser/renderer_host/accelerated_plugin_view_mac.h ...
9 years, 6 months ago (2011-06-10 01:30:12 UTC) #18
jbates
It took a lot of hacking to get this exactly right. There are subtle issues ...
9 years, 6 months ago (2011-06-11 02:00:43 UTC) #19
jbates
Reviews? (Sorry for so many revs)
9 years, 6 months ago (2011-06-13 17:22:13 UTC) #20
Nico
cocoa bits LGTM wow, how did you find this? :-) please update the CL description ...
9 years, 6 months ago (2011-06-13 18:43:06 UTC) #21
Ken Russell (switch to Gerrit)
9 years, 6 months ago (2011-06-13 21:45:12 UTC) #22
LGTM

http://codereview.chromium.org/6993043/diff/19001/chrome/browser/renderer_hos...
File chrome/browser/renderer_host/accelerated_plugin_view_mac.mm (right):

http://codereview.chromium.org/6993043/diff/19001/chrome/browser/renderer_hos...
chrome/browser/renderer_host/accelerated_plugin_view_mac.mm:32: // Note:
cglContext_ lock must be held during this call.
This comment applies to drawView too.

Powered by Google App Engine
This is Rietveld 408576698