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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2296353002: Revert of Remove default begin frame sources from the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 96703a2ef8672c9b27c1ad68291d9823ff6c3b89..3d8912ff46070192a2113bed0ed86403d1610f36 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2360,6 +2360,13 @@
CreateTileManagerResources();
RecreateTreeResources();
+ // Initialize vsync parameters to sane values.
+ const base::TimeDelta display_refresh_interval =
+ base::TimeDelta::FromMicroseconds(
+ base::Time::kMicrosecondsPerSecond /
+ settings_.renderer_settings.refresh_rate);
+ CommitVSyncParameters(base::TimeTicks(), display_refresh_interval);
+
// TODO(brianderson): Don't use a hard-coded parent draw time.
base::TimeDelta parent_draw_time =
(!settings_.use_external_begin_frame_source &&
@@ -2378,6 +2385,11 @@
SetRequiresHighResToDraw();
return true;
+}
+
+void LayerTreeHostImpl::CommitVSyncParameters(base::TimeTicks timebase,
+ base::TimeDelta interval) {
+ client_->CommitVSyncParameters(timebase, interval);
}
void LayerTreeHostImpl::SetBeginFrameSource(BeginFrameSource* source) {
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698