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

Issue 1879833002: Android: Browser-side scheduling latency tweaks (Closed)

Created:
4 years, 8 months ago by no sievers
Modified:
4 years, 8 months ago
Reviewers:
sunnyps, enne (OOO)
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Android: Browser-side scheduling latency tweaks - Emit an immediate 'missed' BeginFrame when an BFObserver is added instead of waiting for next vsync - Remove unneeded requestRender() (=SetNeedsAnimate()) call The former helps both the browser compositor and display scheduler (now that it uses the same BeginFrameSource). Regarding the browser compositor: When the omnibox is hiding (or selection handles are showing) we need to browser composite with the correct scroll offset for a given renderer frame. Without this patch we run: ScrollBegin VSync SwapCompositorFrame VSync BrowserComposite Now we do: ScrollBegin VSync SwapCF MissedBF BrowserComposite VSync In the next interval, this works because if nothing changed yet, the scheduler will defer the BeginMainFrame until there is another change in the browser compositor tree (MODE_LATE). Calling SetNeedsAnimate()) from CompositorViewHolder when the top control offset changes is unnecessary, since this is a renderer-driven animation (causes an invalidation in the browser compositor tree), so will already cause the necessary UpdateLayerTreeHost(). Requesting SetNeedsAnimate() causes an extra BeginMainFrame() (SingleThreadProxy+scheduler are not particularly good at tracking these between needs_commit and needs_animate) and puts us into high latency mode otherwise. Fileed bug crbug.com/602489 to make this more robust in SingleThreadProxy and scheduler. TBR=dtrainor@chromium.org BUG=591725, 602489, 602485, 604007 Committed: https://crrev.com/6414a4526b77dd087581d8a9c1cec50affc66333 Cr-Commit-Position: refs/heads/master@{#389248}

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Total comments: 7

Patch Set 3 : address comments #

Total comments: 2

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -4 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 chunks +33 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (10 generated)
no sievers
Sunny, ptal.
4 years, 8 months ago (2016-04-11 23:06:32 UTC) #3
no sievers
https://codereview.chromium.org/1879833002/diff/1/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/1879833002/diff/1/content/browser/renderer_host/compositor_impl_android.cc#newcode177 content/browser/renderer_host/compositor_impl_android.cc:177: if (needs_begin_frames) { Oh I was going to ask: ...
4 years, 8 months ago (2016-04-11 23:10:10 UTC) #4
sunnyps
The renderer avoids a frame of latency by having RWHVA send it begin frames on ...
4 years, 8 months ago (2016-04-11 23:58:31 UTC) #5
no sievers
hows this?
4 years, 8 months ago (2016-04-13 00:22:50 UTC) #6
no sievers
https://codereview.chromium.org/1879833002/diff/20001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/1879833002/diff/20001/content/browser/renderer_host/compositor_impl_android.cc#newcode180 content/browser/renderer_host/compositor_impl_android.cc:180: last_begin_frame_args_.type = cc::BeginFrameArgs::MISSED; Btw not using MISSED here breaks ...
4 years, 8 months ago (2016-04-13 00:23:53 UTC) #7
enne (OOO)
This definitely also fixes the performance issue from https://chromeperf.appspot.com/group_report?bug_id=604007. I'll add that to the list ...
4 years, 8 months ago (2016-04-18 21:36:01 UTC) #9
enne (OOO)
On 2016/04/11 at 23:58:31, sunnyps wrote: > The renderer avoids a frame of latency by ...
4 years, 8 months ago (2016-04-18 21:36:57 UTC) #11
no sievers
Title+description updated. Per chat with enne@ going to land this for now. https://codereview.chromium.org/1879833002/diff/20001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc ...
4 years, 8 months ago (2016-04-22 19:53:11 UTC) #13
enne (OOO)
https://codereview.chromium.org/1879833002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/1879833002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc#newcode172 content/browser/renderer_host/compositor_impl_android.cc:172: void AddObserver(cc::BeginFrameObserver* obs) override { I do think that ...
4 years, 8 months ago (2016-04-22 19:58:14 UTC) #14
no sievers
https://codereview.chromium.org/1879833002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc File content/browser/renderer_host/compositor_impl_android.cc (right): https://codereview.chromium.org/1879833002/diff/40001/content/browser/renderer_host/compositor_impl_android.cc#newcode172 content/browser/renderer_host/compositor_impl_android.cc:172: void AddObserver(cc::BeginFrameObserver* obs) override { On 2016/04/22 19:58:14, enne ...
4 years, 8 months ago (2016-04-22 19:59:43 UTC) #15
sunnyps
LGTM
4 years, 8 months ago (2016-04-22 20:13:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879833002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879833002/60001
4 years, 8 months ago (2016-04-22 20:31:46 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-04-22 21:33:31 UTC) #22
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 21:34:53 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6414a4526b77dd087581d8a9c1cec50affc66333
Cr-Commit-Position: refs/heads/master@{#389248}

Powered by Google App Engine
This is Rietveld 408576698