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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2275253003: Fix jank on Android due to bad scheduler deadline (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 071319c906cf30aa5f91249ed80d54880f3a59ce..c02004d783c13212b3d0df43a3b5a7f00dc5fe44 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -200,7 +200,8 @@ void ExternalBeginFrameSource::RemoveObserver(cc::BeginFrameObserver* obs) {
void ExternalBeginFrameSource::OnVSync(base::TimeTicks frame_time,
base::TimeDelta vsync_period) {
- base::TimeTicks deadline = std::max(base::TimeTicks::Now(), frame_time);
+ // frame time is in the past, so give the next vsync period as the deadline.
+ base::TimeTicks deadline = frame_time + vsync_period;
last_begin_frame_args_ =
cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
vsync_period, cc::BeginFrameArgs::NORMAL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698