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

Issue 165703002: Do not send a frame swap ack from the browser until the frame is drawn (Closed)

Created:
6 years, 10 months ago by ccameron
Modified:
6 years, 10 months ago
Reviewers:
piman
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, brianderson
Base URL:
https://chromium.googlesource.com/chromium/src.git@dynamic_async
Visibility:
Public.

Description

Do not send a frame swap ack from the browser until the frame is drawn Code to do this was recently removed because it was no longer being used in r241225 (https://codereview.chromium.org/116103002). This is now necessary again to throttle renderers when using CoreAnimation. Frames are acked only when they are drawn. Both the CoreAnimation and the non-CoreAnimation paths are changed to behave this way. By virtue of the fact that the non-CoreAnimation path draws immediately, this should have no functional effect on that path. This differs from the mechanism deleted in the aforementioned patch in two ways. First, it uses a scoped_ptr of a struct instead of a vector of pairs to store the information about the swap being returned. This should improve readability in that the ack has struct names instead of just first and second in the pair, and in that the scoped_ptr does not suggest support for multiple pending swaps (which does not exist). Second, it does makes RWHVMac ack frames more aggressively when inside a draw call, rather than adding a call from RWHImpl to the view, to effect the ack (which is what the old way does). BUG=340133 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251918

Patch Set 1 #

Total comments: 4

Patch Set 2 : More 500s #

Patch Set 3 : Re-resolve #

Total comments: 4

Patch Set 4 : Incorporate review feedback #

Patch Set 5 : Add swap ack missed with devtools overlays #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -49 lines) Patch
M content/browser/renderer_host/compositing_iosurface_layer_mac.mm View 1 2 3 3 chunks +48 lines, -29 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 chunks +19 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 9 chunks +48 lines, -18 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
ccameron
I'm considering a "I delete the code and re-commit it" meme...
6 years, 10 months ago (2014-02-14 01:31:41 UTC) #1
piman
https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.h File content/browser/renderer_host/render_widget_host_impl.h (right): https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.h#newcode251 content/browser/renderer_host/render_widget_host_impl.h:251: const base::Closure& about_to_wait_for_backing_store_callback); Do you really need this? There's ...
6 years, 10 months ago (2014-02-14 02:15:56 UTC) #2
ccameron
https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode868 content/browser/renderer_host/render_widget_host_impl.cc:868: about_to_wait_for_backing_store_callback_.Run(); The call that we need it before is ...
6 years, 10 months ago (2014-02-14 02:19:06 UTC) #3
piman
https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/165703002/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode868 content/browser/renderer_host/render_widget_host_impl.cc:868: about_to_wait_for_backing_store_callback_.Run(); On 2014/02/14 02:19:06, ccameron1 wrote: > The call ...
6 years, 10 months ago (2014-02-14 02:59:01 UTC) #4
ccameron
Yes, you're right, that's the easy way to do it. I didn't go so far ...
6 years, 10 months ago (2014-02-14 07:53:16 UTC) #5
ccameron
(oh, and ptal)
6 years, 10 months ago (2014-02-14 19:30:44 UTC) #6
ccameron
Pinging again.
6 years, 10 months ago (2014-02-18 21:30:40 UTC) #7
piman
lgtm https://codereview.chromium.org/165703002/diff/340001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/165703002/diff/340001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode22 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:22: // resize. This may potentially pump the run ...
6 years, 10 months ago (2014-02-18 21:47:03 UTC) #8
ccameron
Thanks!! https://codereview.chromium.org/165703002/diff/340001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/165703002/diff/340001/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode22 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:22: // resize. This may potentially pump the run ...
6 years, 10 months ago (2014-02-18 22:33:10 UTC) #9
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 10 months ago (2014-02-18 22:33:14 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/165703002/420001
6 years, 10 months ago (2014-02-18 22:34:05 UTC) #11
ccameron
The CQ bit was unchecked by ccameron@chromium.org
6 years, 10 months ago (2014-02-18 22:56:57 UTC) #12
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 10 months ago (2014-02-18 23:10:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/165703002/610002
6 years, 10 months ago (2014-02-18 23:13:58 UTC) #14
commit-bot: I haz the power
6 years, 10 months ago (2014-02-19 01:57:27 UTC) #15
Message was sent while issue was closed.
Change committed as 251918

Powered by Google App Engine
This is Rietveld 408576698