| 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 0eb8f5c2bc745ea60daadaf4b3c2ce9857a4649b..1fbdc33b91c9c99ece905364c9e353cdcaceedcb 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1290,8 +1290,8 @@ void LayerTreeHostImpl::DidSwapBuffers() {
|
| client_->DidSwapBuffersOnImplThread();
|
| }
|
|
|
| -void LayerTreeHostImpl::OnSwapBuffersComplete() {
|
| - client_->OnSwapBuffersCompleteOnImplThread();
|
| +void LayerTreeHostImpl::DidSwapBuffersComplete() {
|
| + client_->DidSwapBuffersCompleteOnImplThread();
|
| }
|
|
|
| void LayerTreeHostImpl::ReclaimResources(const CompositorFrameAck* ack) {
|
| @@ -1885,8 +1885,11 @@ bool LayerTreeHostImpl::InitializeRenderer(
|
| GetRendererCapabilities().allow_rasterize_on_demand);
|
| }
|
|
|
| - // Setup BeginFrameEmulation 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 BeginFrameEmulation if it's not supported natively
|
| const base::TimeDelta display_refresh_interval =
|
| base::TimeDelta::FromMicroseconds(
|
| base::Time::kMicrosecondsPerSecond /
|
| @@ -1894,7 +1897,6 @@ bool LayerTreeHostImpl::InitializeRenderer(
|
|
|
| output_surface->InitializeBeginFrameEmulation(
|
| proxy_->ImplThreadTaskRunner(),
|
| - settings_.throttle_frame_production,
|
| display_refresh_interval);
|
| }
|
|
|
| @@ -1902,7 +1904,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_->SetMaxSwapsPendingOnImplThread(max_frames_pending);
|
|
|
| resource_provider_ = resource_provider.Pass();
|
| output_surface_ = output_surface.Pass();
|
|
|