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 0dcb09010c68197f7f73ef0ffcbf31a8b702c7e9..17359bc2535940ea6af3b1fa0d79d742abc68f2e 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1835,8 +1835,11 @@ bool LayerTreeHostImpl::InitializeRenderer( |
GetRendererCapabilities().allow_rasterize_on_demand); |
} |
- // Setup BeginImplFrameEmulation if it's not supported natively |
- if (!settings_.begin_impl_frame_scheduling_enabled) { |
+ if (!settings_.throttle_frame_production) { |
+ // Disable VSync |
+ output_surface->SetThrottleFrameProduction(false); |
+ } else if (!settings_.begin_impl_frame_scheduling_enabled) { |
+ // Setup BeginImplFrameEmulation if it's not supported natively |
const base::TimeDelta display_refresh_interval = |
base::TimeDelta::FromMicroseconds( |
base::Time::kMicrosecondsPerSecond / |
@@ -1844,7 +1847,6 @@ bool LayerTreeHostImpl::InitializeRenderer( |
output_surface->InitializeBeginImplFrameEmulation( |
proxy_->ImplThreadTaskRunner(), |
- settings_.throttle_frame_production, |
display_refresh_interval); |
} |
@@ -1852,7 +1854,7 @@ bool LayerTreeHostImpl::InitializeRenderer( |
output_surface->capabilities().max_frames_pending; |
if (max_frames_pending <= 0) |
max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; |
- output_surface->SetMaxFramesPending(max_frames_pending); |
+ client_->SetMaxSwapsPending(max_frames_pending); |
resource_provider_ = resource_provider.Pass(); |
output_surface_ = output_surface.Pass(); |