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

Issue 2170053002: Set BrowserCompositorOutputSurface's vsync parameters on mac (Closed)

Created:
4 years, 5 months ago by enne (OOO)
Modified:
4 years, 5 months ago
Reviewers:
Daniel Erat, ccameron
CC:
brianderson, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sadrul, sievers+watch_chromium.org, tfarina, Ian Vollick
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set BrowserCompositorOutputSurface's vsync parameters on mac Mac routes vsync parameters differently than other platforms. Other platforms go directly through BrowserCompositorOutputSurface, which then routes it to the vsync manager (without begin frame scheduling) or just to the root BeginFrameSource for that BrowserCompositorOutputsurface (with begin frame scheduling). Mac is different in that the RenderWidgetHostViewMac gets the vsync info from the DisplayLink, which forwards it to the BrowserCompositorMac. This would then forward that to the ui::Compositor's vsync manager which would then be used to tick the browser and then indirectly would forward to the begin frame source for the BrowserCompositorOutputSurface to tick the display. --enable-begin-frame-scheduling turns off the vsync manager, which previously left the browser and then display compositors to tick at default intervals and timebases on Mac, leading to power regressions. OOPS. This patch adds an additional route where the BrowserCompositorMac forwards vsync info to the BrowserCompositorOutputSurface's BeginFrameSource via ui::Compositor's ui::ContextFactory (aka GpuProcessTransportFactory). As the BrowserCompositorOutputSurface's begin frame source is the source of all frames when using --enable-begin-frame-scheduling, this fixes the regression. Once --enable-begin-frame-scheduling becomes the default, all of the vsync info and vsync manager plumbing can be removed. With this patch, power usage on one test laptop for h264 video when using --enable-begin-frame-scheduling goes from 2.00W -> 2.05W instead of from 2.0W -> 2.3W. R=ccameron@chromium.org Committed: https://crrev.com/bd7d5c4d81610751aca50b1c599460c434f29be2 Cr-Commit-Position: refs/heads/master@{#407632}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -0 lines) Patch
M ash/sysui/stub_context_factory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.mm View 1 chunk +4 lines, -0 lines 1 comment Download
M ui/compositor/compositor.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/mus/surface_context_factory.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (13 generated)
enne (OOO)
4 years, 5 months ago (2016-07-21 20:57:37 UTC) #4
enne (OOO)
I'm not sure if there's some way to move DisplayLink somewhere closer to Display/BrowserCompositorOutputSurface so ...
4 years, 5 months ago (2016-07-21 20:58:42 UTC) #5
ccameron
On 2016/07/21 20:58:42, enne wrote: > I'm not sure if there's some way to move ...
4 years, 5 months ago (2016-07-22 21:37:33 UTC) #11
ccameron
https://codereview.chromium.org/2170053002/diff/1/content/browser/renderer_host/browser_compositor_view_mac.mm File content/browser/renderer_host/browser_compositor_view_mac.mm (right): https://codereview.chromium.org/2170053002/diff/1/content/browser/renderer_host/browser_compositor_view_mac.mm#newcode295 content/browser/renderer_host/browser_compositor_view_mac.mm:295: } Would it make sense to just do: if ...
4 years, 5 months ago (2016-07-25 17:30:12 UTC) #12
enne (OOO)
Technically, at the moment, this is the same BFS, although it's just a BeginFrameSource and ...
4 years, 5 months ago (2016-07-25 19:07:30 UTC) #13
ccameron
On 2016/07/25 19:07:30, enne wrote: > Technically, at the moment, this is the same BFS, ...
4 years, 5 months ago (2016-07-25 21:34:25 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2170053002/1
4 years, 5 months ago (2016-07-25 22:19:09 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/224595)
4 years, 5 months ago (2016-07-25 22:26:00 UTC) #18
enne (OOO)
+derat for ash/ OWNERS
4 years, 5 months ago (2016-07-25 22:29:00 UTC) #20
Daniel Erat
lgtm for ash/
4 years, 5 months ago (2016-07-25 23:11:31 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2170053002/1
4 years, 5 months ago (2016-07-25 23:30:04 UTC) #23
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-25 23:35:16 UTC) #24
commit-bot: I haz the power
4 years, 5 months ago (2016-07-25 23:38:00 UTC) #26
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/bd7d5c4d81610751aca50b1c599460c434f29be2
Cr-Commit-Position: refs/heads/master@{#407632}

Powered by Google App Engine
This is Rietveld 408576698