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

Issue 171513012: Make --disable-gpu-vsync work with CoreAnimation (Closed)

Created:
6 years, 10 months ago by ccameron
Modified:
6 years, 10 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Make --disable-gpu-vsync work with CoreAnimation CoreAnimation provides GPU backpressure from the browser process to the renderer process by only acknowledging frames when they are displayed. This mechanism has the side-effect of throttling the renderer to about vsync, because the layer will not request to be displayed much more than once per vsync. Relieve this pressure by not going into isAsynchronous mode when receiving new frames when vsync is disabled. This exposed an issue where unluckily-timed setNeedsDisplay calls could be dropped on the floor, hanging the renderer because it would never get its ack. Work around this by calling setNeedsDisplay and displayIfNeeded explicitly, and, if the draw is not triggered by that, sending the ack explicitly. This bug has never triggered without vsync disabled, but apply the workaround in both situations, to be sure. Use a ScopedClosureRunner to ensure that the swap ack be issued in CompositorSwapBuffers, rather than sprinkling ack calls all over the function. Remove the TODOs because the scoped runner should solve the problem they were working around. BUG=245900 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252784

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Add matching loops #

Total comments: 1

Patch Set 4 : Add swap ack scoped runner fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -18 lines) Patch
M content/browser/renderer_host/compositing_iosurface_context_mac.mm View 1 chunk +7 lines, -4 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_layer_mac.mm View 1 2 3 3 chunks +26 lines, -3 lines 2 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 7 chunks +8 lines, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
ccameron
Ptal. Thanks! https://codereview.chromium.org/171513012/diff/60001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/171513012/diff/60001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode197 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:197: This is to match the behavior of ...
6 years, 10 months ago (2014-02-20 10:42:58 UTC) #1
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/171513012/diff/100001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/171513012/diff/100001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode71 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:71: renderWidgetHostView_->SendPendingSwapAck(); If we're mostly sending swap acks upon receiving ...
6 years, 10 months ago (2014-02-20 23:01:52 UTC) #2
ccameron
https://codereview.chromium.org/171513012/diff/100001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/171513012/diff/100001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode71 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:71: renderWidgetHostView_->SendPendingSwapAck(); On 2014/02/20 23:01:53, Ken Russell wrote: > If ...
6 years, 10 months ago (2014-02-21 00:48:23 UTC) #3
Ken Russell (switch to Gerrit)
OK. Thanks for the careful thought about this. I trust your judgment. LGTM
6 years, 10 months ago (2014-02-21 22:21:50 UTC) #4
ccameron
Thanks. Hopefully reality will corroborate my model of this.
6 years, 10 months ago (2014-02-21 22:47:02 UTC) #5
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 10 months ago (2014-02-21 22:47:14 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/171513012/100001
6 years, 10 months ago (2014-02-21 22:48:44 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-22 00:44:44 UTC) #8
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=268246
6 years, 10 months ago (2014-02-22 00:44:45 UTC) #9
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 10 months ago (2014-02-22 00:48:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/171513012/100001
6 years, 10 months ago (2014-02-22 00:50:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/171513012/100001
6 years, 10 months ago (2014-02-22 01:35:16 UTC) #12
commit-bot: I haz the power
6 years, 10 months ago (2014-02-22 08:33:48 UTC) #13
Message was sent while issue was closed.
Change committed as 252784

Powered by Google App Engine
This is Rietveld 408576698