| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 LayerTreeHost::InitParams::InitParams() { | 126 LayerTreeHost::InitParams::InitParams() { |
| 127 } | 127 } |
| 128 | 128 |
| 129 LayerTreeHost::InitParams::~InitParams() { | 129 LayerTreeHost::InitParams::~InitParams() { |
| 130 } | 130 } |
| 131 | 131 |
| 132 std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded( | 132 std::unique_ptr<LayerTreeHostInterface> LayerTreeHost::CreateThreaded( |
| 133 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 133 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 134 InitParams* params) { | 134 InitParams* params) { |
| 135 DCHECK(params->main_task_runner.get()); | 135 DCHECK(params->main_task_runner.get()); |
| 136 DCHECK(impl_task_runner.get()); | 136 DCHECK(impl_task_runner.get()); |
| 137 DCHECK(params->settings); | 137 DCHECK(params->settings); |
| 138 std::unique_ptr<LayerTreeHost> layer_tree_host( | 138 std::unique_ptr<LayerTreeHost> layer_tree_host( |
| 139 new LayerTreeHost(params, CompositorMode::THREADED)); | 139 new LayerTreeHost(params, CompositorMode::THREADED)); |
| 140 layer_tree_host->InitializeThreaded( | 140 layer_tree_host->InitializeThreaded( |
| 141 params->main_task_runner, impl_task_runner, | 141 params->main_task_runner, impl_task_runner, |
| 142 std::move(params->external_begin_frame_source)); | 142 std::move(params->external_begin_frame_source)); |
| 143 return layer_tree_host; | 143 return std::move(layer_tree_host); |
| 144 } | 144 } |
| 145 | 145 |
| 146 std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded( | 146 std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded( |
| 147 LayerTreeHostSingleThreadClient* single_thread_client, | 147 LayerTreeHostSingleThreadClient* single_thread_client, |
| 148 InitParams* params) { | 148 InitParams* params) { |
| 149 DCHECK(params->settings); | 149 DCHECK(params->settings); |
| 150 std::unique_ptr<LayerTreeHost> layer_tree_host( | 150 std::unique_ptr<LayerTreeHost> layer_tree_host( |
| 151 new LayerTreeHost(params, CompositorMode::SINGLE_THREADED)); | 151 new LayerTreeHost(params, CompositorMode::SINGLE_THREADED)); |
| 152 layer_tree_host->InitializeSingleThreaded( | 152 layer_tree_host->InitializeSingleThreaded( |
| 153 single_thread_client, params->main_task_runner, | 153 single_thread_client, params->main_task_runner, |
| 154 std::move(params->external_begin_frame_source)); | 154 std::move(params->external_begin_frame_source)); |
| 155 return layer_tree_host; | 155 return layer_tree_host; |
| 156 } | 156 } |
| 157 | 157 |
| 158 std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteServer( | 158 std::unique_ptr<LayerTreeHostInterface> LayerTreeHost::CreateRemoteServer( |
| 159 RemoteProtoChannel* remote_proto_channel, | 159 RemoteProtoChannel* remote_proto_channel, |
| 160 InitParams* params) { | 160 InitParams* params) { |
| 161 DCHECK(params->main_task_runner.get()); | 161 DCHECK(params->main_task_runner.get()); |
| 162 DCHECK(params->settings); | 162 DCHECK(params->settings); |
| 163 DCHECK(remote_proto_channel); | 163 DCHECK(remote_proto_channel); |
| 164 TRACE_EVENT0("cc.remote", "LayerTreeHost::CreateRemoteServer"); | 164 TRACE_EVENT0("cc.remote", "LayerTreeHost::CreateRemoteServer"); |
| 165 | 165 |
| 166 // Using an external begin frame source is not supported on the server in | 166 // Using an external begin frame source is not supported on the server in |
| 167 // remote mode. | 167 // remote mode. |
| 168 DCHECK(!params->settings->use_external_begin_frame_source); | 168 DCHECK(!params->settings->use_external_begin_frame_source); |
| 169 DCHECK(!params->external_begin_frame_source); | 169 DCHECK(!params->external_begin_frame_source); |
| 170 DCHECK(params->image_serialization_processor); | 170 DCHECK(params->image_serialization_processor); |
| 171 | 171 |
| 172 std::unique_ptr<LayerTreeHost> layer_tree_host( | 172 std::unique_ptr<LayerTreeHost> layer_tree_host( |
| 173 new LayerTreeHost(params, CompositorMode::REMOTE)); | 173 new LayerTreeHost(params, CompositorMode::REMOTE)); |
| 174 layer_tree_host->InitializeRemoteServer(remote_proto_channel, | 174 layer_tree_host->InitializeRemoteServer(remote_proto_channel, |
| 175 params->main_task_runner); | 175 params->main_task_runner); |
| 176 return layer_tree_host; | 176 return std::move(layer_tree_host); |
| 177 } | 177 } |
| 178 | 178 |
| 179 std::unique_ptr<LayerTreeHost> LayerTreeHost::CreateRemoteClient( | 179 std::unique_ptr<LayerTreeHostInterface> LayerTreeHost::CreateRemoteClient( |
| 180 RemoteProtoChannel* remote_proto_channel, | 180 RemoteProtoChannel* remote_proto_channel, |
| 181 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 181 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 182 InitParams* params) { | 182 InitParams* params) { |
| 183 DCHECK(params->main_task_runner.get()); | 183 DCHECK(params->main_task_runner.get()); |
| 184 DCHECK(params->settings); | 184 DCHECK(params->settings); |
| 185 DCHECK(remote_proto_channel); | 185 DCHECK(remote_proto_channel); |
| 186 | 186 |
| 187 // Using an external begin frame source is not supported in remote mode. | 187 // Using an external begin frame source is not supported in remote mode. |
| 188 // TODO(khushalsagar): Add support for providing an external begin frame | 188 // TODO(khushalsagar): Add support for providing an external begin frame |
| 189 // source on the client LayerTreeHost. crbug/576962 | 189 // source on the client LayerTreeHost. crbug/576962 |
| 190 DCHECK(!params->settings->use_external_begin_frame_source); | 190 DCHECK(!params->settings->use_external_begin_frame_source); |
| 191 DCHECK(!params->external_begin_frame_source); | 191 DCHECK(!params->external_begin_frame_source); |
| 192 DCHECK(params->image_serialization_processor); | 192 DCHECK(params->image_serialization_processor); |
| 193 | 193 |
| 194 std::unique_ptr<LayerTreeHost> layer_tree_host( | 194 std::unique_ptr<LayerTreeHost> layer_tree_host( |
| 195 new LayerTreeHost(params, CompositorMode::REMOTE)); | 195 new LayerTreeHost(params, CompositorMode::REMOTE)); |
| 196 layer_tree_host->InitializeRemoteClient( | 196 layer_tree_host->InitializeRemoteClient( |
| 197 remote_proto_channel, params->main_task_runner, impl_task_runner); | 197 remote_proto_channel, params->main_task_runner, impl_task_runner); |
| 198 return layer_tree_host; | 198 return std::move(layer_tree_host); |
| 199 } | 199 } |
| 200 | 200 |
| 201 LayerTreeHost::LayerTreeHost(InitParams* params, CompositorMode mode) | 201 LayerTreeHost::LayerTreeHost(InitParams* params, CompositorMode mode) |
| 202 : LayerTreeHost( | 202 : LayerTreeHost( |
| 203 params, | 203 params, |
| 204 mode, | 204 mode, |
| 205 base::MakeUnique<LayerTree>(std::move(params->animation_host), | 205 base::MakeUnique<LayerTree>(std::move(params->animation_host), |
| 206 this)) {} | 206 this)) {} |
| 207 | 207 |
| 208 LayerTreeHost::LayerTreeHost(InitParams* params, | 208 LayerTreeHost::LayerTreeHost(InitParams* params, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 if (proxy_) { | 352 if (proxy_) { |
| 353 DCHECK(task_runner_provider_->IsMainThread()); | 353 DCHECK(task_runner_provider_->IsMainThread()); |
| 354 proxy_->Stop(); | 354 proxy_->Stop(); |
| 355 | 355 |
| 356 // Proxy must be destroyed before the Task Runner Provider. | 356 // Proxy must be destroyed before the Task Runner Provider. |
| 357 proxy_ = nullptr; | 357 proxy_ = nullptr; |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 | 360 |
| 361 int LayerTreeHost::GetId() const { |
| 362 return id_; |
| 363 } |
| 364 |
| 365 int LayerTreeHost::SourceFrameNumber() const { |
| 366 return source_frame_number_; |
| 367 } |
| 368 |
| 369 LayerTree* LayerTreeHost::GetLayerTree() { |
| 370 return layer_tree_.get(); |
| 371 } |
| 372 |
| 373 const LayerTree* LayerTreeHost::GetLayerTree() const { |
| 374 return layer_tree_.get(); |
| 375 } |
| 376 |
| 377 TaskRunnerProvider* LayerTreeHost::GetTaskRunnerProvider() const { |
| 378 return task_runner_provider_.get(); |
| 379 } |
| 380 |
| 381 const LayerTreeSettings& LayerTreeHost::GetSettings() const { |
| 382 return settings_; |
| 383 } |
| 384 |
| 361 void LayerTreeHost::WillBeginMainFrame() { | 385 void LayerTreeHost::WillBeginMainFrame() { |
| 362 devtools_instrumentation::WillBeginMainThreadFrame(id(), | 386 devtools_instrumentation::WillBeginMainThreadFrame(GetId(), |
| 363 source_frame_number()); | 387 SourceFrameNumber()); |
| 364 client_->WillBeginMainFrame(); | 388 client_->WillBeginMainFrame(); |
| 365 } | 389 } |
| 366 | 390 |
| 367 void LayerTreeHost::DidBeginMainFrame() { | 391 void LayerTreeHost::DidBeginMainFrame() { |
| 368 client_->DidBeginMainFrame(); | 392 client_->DidBeginMainFrame(); |
| 369 } | 393 } |
| 370 | 394 |
| 371 void LayerTreeHost::BeginMainFrameNotExpectedSoon() { | 395 void LayerTreeHost::BeginMainFrameNotExpectedSoon() { |
| 372 client_->BeginMainFrameNotExpectedSoon(); | 396 client_->BeginMainFrameNotExpectedSoon(); |
| 373 } | 397 } |
| 374 | 398 |
| 375 void LayerTreeHost::BeginMainFrame(const BeginFrameArgs& args) { | 399 void LayerTreeHost::BeginMainFrame(const BeginFrameArgs& args) { |
| 376 client_->BeginMainFrame(args); | 400 client_->BeginMainFrame(args); |
| 377 } | 401 } |
| 378 | 402 |
| 379 void LayerTreeHost::DidStopFlinging() { | 403 void LayerTreeHost::DidStopFlinging() { |
| 380 proxy_->MainThreadHasStoppedFlinging(); | 404 proxy_->MainThreadHasStoppedFlinging(); |
| 381 } | 405 } |
| 382 | 406 |
| 407 const LayerTreeDebugState& LayerTreeHost::GetDebugState() const { |
| 408 return debug_state_; |
| 409 } |
| 410 |
| 383 void LayerTreeHost::RequestMainFrameUpdate() { | 411 void LayerTreeHost::RequestMainFrameUpdate() { |
| 384 client_->UpdateLayerTreeHost(); | 412 client_->UpdateLayerTreeHost(); |
| 385 } | 413 } |
| 386 | 414 |
| 387 // This function commits the LayerTreeHost to an impl tree. When modifying | 415 // This function commits the LayerTreeHost to an impl tree. When modifying |
| 388 // this function, keep in mind that the function *runs* on the impl thread! Any | 416 // this function, keep in mind that the function *runs* on the impl thread! Any |
| 389 // code that is logically a main thread operation, e.g. deletion of a Layer, | 417 // code that is logically a main thread operation, e.g. deletion of a Layer, |
| 390 // should be delayed until the LayerTreeHost::CommitComplete, which will run | 418 // should be delayed until the LayerTreeHost::CommitComplete, which will run |
| 391 // after the commit, but on the main thread. | 419 // after the commit, but on the main thread. |
| 392 void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { | 420 void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
| 393 DCHECK(!IsRemoteServer()); | 421 DCHECK(!IsRemoteServer()); |
| 394 DCHECK(task_runner_provider_->IsImplThread()); | 422 DCHECK(task_runner_provider_->IsImplThread()); |
| 395 | 423 |
| 396 bool is_new_trace; | 424 bool is_new_trace; |
| 397 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); | 425 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); |
| 398 if (is_new_trace && | 426 if (is_new_trace && |
| 399 frame_viewer_instrumentation::IsTracingLayerTreeSnapshots() && | 427 frame_viewer_instrumentation::IsTracingLayerTreeSnapshots() && |
| 400 layer_tree_->root_layer()) { | 428 layer_tree_->root_layer()) { |
| 401 LayerTreeHostCommon::CallFunctionForEveryLayer( | 429 LayerTreeHostCommon::CallFunctionForEveryLayer( |
| 402 layer_tree_.get(), [](Layer* layer) { layer->DidBeginTracing(); }); | 430 layer_tree_.get(), [](Layer* layer) { layer->DidBeginTracing(); }); |
| 403 } | 431 } |
| 404 | 432 |
| 405 LayerTreeImpl* sync_tree = host_impl->sync_tree(); | 433 LayerTreeImpl* sync_tree = host_impl->sync_tree(); |
| 406 | 434 |
| 407 if (next_commit_forces_redraw_) { | 435 if (next_commit_forces_redraw_) { |
| 408 sync_tree->ForceRedrawNextActivation(); | 436 sync_tree->ForceRedrawNextActivation(); |
| 409 next_commit_forces_redraw_ = false; | 437 next_commit_forces_redraw_ = false; |
| 410 } | 438 } |
| 411 | 439 |
| 412 sync_tree->set_source_frame_number(source_frame_number()); | 440 sync_tree->set_source_frame_number(SourceFrameNumber()); |
| 413 | 441 |
| 414 if (layer_tree_->needs_full_tree_sync()) | 442 if (layer_tree_->needs_full_tree_sync()) |
| 415 TreeSynchronizer::SynchronizeTrees(layer_tree_->root_layer(), sync_tree); | 443 TreeSynchronizer::SynchronizeTrees(layer_tree_->root_layer(), sync_tree); |
| 416 | 444 |
| 417 layer_tree_->PushPropertiesTo(sync_tree); | 445 layer_tree_->PushPropertiesTo(sync_tree); |
| 418 | 446 |
| 419 sync_tree->PassSwapPromises(std::move(swap_promise_list_)); | 447 sync_tree->PassSwapPromises(std::move(swap_promise_list_)); |
| 420 swap_promise_list_.clear(); | 448 swap_promise_list_.clear(); |
| 421 | 449 |
| 422 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); | 450 host_impl->SetHasGpuRasterizationTrigger(has_gpu_rasterization_trigger_); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 layer_tree_->SetPageScaleFromImplSide(page_scale); | 668 layer_tree_->SetPageScaleFromImplSide(page_scale); |
| 641 } | 669 } |
| 642 | 670 |
| 643 void LayerTreeHost::SetVisible(bool visible) { | 671 void LayerTreeHost::SetVisible(bool visible) { |
| 644 if (visible_ == visible) | 672 if (visible_ == visible) |
| 645 return; | 673 return; |
| 646 visible_ = visible; | 674 visible_ = visible; |
| 647 proxy_->SetVisible(visible); | 675 proxy_->SetVisible(visible); |
| 648 } | 676 } |
| 649 | 677 |
| 678 bool LayerTreeHost::IsVisible() const { |
| 679 return visible_; |
| 680 } |
| 681 |
| 650 void LayerTreeHost::NotifyInputThrottledUntilCommit() { | 682 void LayerTreeHost::NotifyInputThrottledUntilCommit() { |
| 651 proxy_->NotifyInputThrottledUntilCommit(); | 683 proxy_->NotifyInputThrottledUntilCommit(); |
| 652 } | 684 } |
| 653 | 685 |
| 654 void LayerTreeHost::LayoutAndUpdateLayers() { | 686 void LayerTreeHost::LayoutAndUpdateLayers() { |
| 655 DCHECK(IsSingleThreaded()); | 687 DCHECK(IsSingleThreaded()); |
| 656 // This function is only valid when not using the scheduler. | 688 // This function is only valid when not using the scheduler. |
| 657 DCHECK(!settings_.single_thread_proxy_scheduler); | 689 DCHECK(!settings_.single_thread_proxy_scheduler); |
| 658 RequestMainFrameUpdate(); | 690 RequestMainFrameUpdate(); |
| 659 UpdateLayers(); | 691 UpdateLayers(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 layer_tree_->outer_viewport_scroll_layer(), | 748 layer_tree_->outer_viewport_scroll_layer(), |
| 717 layer_tree_->overscroll_elasticity_layer(), | 749 layer_tree_->overscroll_elasticity_layer(), |
| 718 layer_tree_->elastic_overscroll(), layer_tree_->page_scale_factor(), | 750 layer_tree_->elastic_overscroll(), layer_tree_->page_scale_factor(), |
| 719 layer_tree_->device_scale_factor(), | 751 layer_tree_->device_scale_factor(), |
| 720 gfx::Rect(layer_tree_->device_viewport_size()), identity_transform, | 752 gfx::Rect(layer_tree_->device_viewport_size()), identity_transform, |
| 721 layer_tree_->property_trees()); | 753 layer_tree_->property_trees()); |
| 722 } | 754 } |
| 723 | 755 |
| 724 bool LayerTreeHost::DoUpdateLayers(Layer* root_layer) { | 756 bool LayerTreeHost::DoUpdateLayers(Layer* root_layer) { |
| 725 TRACE_EVENT1("cc", "LayerTreeHost::DoUpdateLayers", "source_frame_number", | 757 TRACE_EVENT1("cc", "LayerTreeHost::DoUpdateLayers", "source_frame_number", |
| 726 source_frame_number()); | 758 SourceFrameNumber()); |
| 727 | 759 |
| 728 layer_tree_->UpdateHudLayer(debug_state_.ShowHudInfo()); | 760 layer_tree_->UpdateHudLayer(debug_state_.ShowHudInfo()); |
| 729 UpdateHudLayer(); | 761 UpdateHudLayer(); |
| 730 | 762 |
| 731 Layer* root_scroll = | 763 Layer* root_scroll = |
| 732 PropertyTreeBuilder::FindFirstScrollableLayer(root_layer); | 764 PropertyTreeBuilder::FindFirstScrollableLayer(root_layer); |
| 733 Layer* page_scale_layer = layer_tree_->page_scale_layer(); | 765 Layer* page_scale_layer = layer_tree_->page_scale_layer(); |
| 734 if (!page_scale_layer && root_scroll) | 766 if (!page_scale_layer && root_scroll) |
| 735 page_scale_layer = root_scroll->parent(); | 767 page_scale_layer = root_scroll->parent(); |
| 736 | 768 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 SetNeedsUpdateLayers(); | 882 SetNeedsUpdateLayers(); |
| 851 } | 883 } |
| 852 } | 884 } |
| 853 | 885 |
| 854 // This needs to happen after scroll deltas have been sent to prevent top | 886 // This needs to happen after scroll deltas have been sent to prevent top |
| 855 // controls from clamping the layout viewport both on the compositor and | 887 // controls from clamping the layout viewport both on the compositor and |
| 856 // on the main thread. | 888 // on the main thread. |
| 857 ApplyViewportDeltas(info); | 889 ApplyViewportDeltas(info); |
| 858 } | 890 } |
| 859 | 891 |
| 892 const base::WeakPtr<InputHandler>& LayerTreeHost::GetInputHandler() const { |
| 893 return input_handler_weak_ptr_; |
| 894 } |
| 895 |
| 860 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, | 896 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
| 861 TopControlsState current, | 897 TopControlsState current, |
| 862 bool animate) { | 898 bool animate) { |
| 863 // Top controls are only used in threaded or remote mode. | 899 // Top controls are only used in threaded or remote mode. |
| 864 DCHECK(IsThreaded() || IsRemoteServer()); | 900 DCHECK(IsThreaded() || IsRemoteServer()); |
| 865 proxy_->UpdateTopControlsState(constraints, current, animate); | 901 proxy_->UpdateTopControlsState(constraints, current, animate); |
| 866 } | 902 } |
| 867 | 903 |
| 868 void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) { | 904 void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) { |
| 869 AnimationHost* animation_host = layer_tree_->animation_host(); | 905 AnimationHost* animation_host = layer_tree_->animation_host(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 std::vector<std::unique_ptr<SwapPromise>> to_return; | 1017 std::vector<std::unique_ptr<SwapPromise>> to_return; |
| 982 to_return.swap(swap_promise_list_); | 1018 to_return.swap(swap_promise_list_); |
| 983 return to_return; | 1019 return to_return; |
| 984 } | 1020 } |
| 985 | 1021 |
| 986 void LayerTreeHost::OnCommitForSwapPromises() { | 1022 void LayerTreeHost::OnCommitForSwapPromises() { |
| 987 for (const auto& swap_promise : swap_promise_list_) | 1023 for (const auto& swap_promise : swap_promise_list_) |
| 988 swap_promise->OnCommit(); | 1024 swap_promise->OnCommit(); |
| 989 } | 1025 } |
| 990 | 1026 |
| 991 void LayerTreeHost::set_surface_client_id(uint32_t client_id) { | 1027 void LayerTreeHost::SetSurfaceClientId(uint32_t client_id) { |
| 992 surface_client_id_ = client_id; | 1028 surface_client_id_ = client_id; |
| 993 } | 1029 } |
| 994 | 1030 |
| 995 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { | 1031 SurfaceSequence LayerTreeHost::CreateSurfaceSequence() { |
| 996 return SurfaceSequence(surface_client_id_, next_surface_sequence_++); | 1032 return SurfaceSequence(surface_client_id_, next_surface_sequence_++); |
| 997 } | 1033 } |
| 998 | 1034 |
| 999 void LayerTreeHost::SetLayerTreeMutator( | 1035 void LayerTreeHost::SetLayerTreeMutator( |
| 1000 std::unique_ptr<LayerTreeMutator> mutator) { | 1036 std::unique_ptr<LayerTreeMutator> mutator) { |
| 1001 proxy_->SetMutator(std::move(mutator)); | 1037 proxy_->SetMutator(std::move(mutator)); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); | 1141 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); |
| 1106 content_is_suitable_for_gpu_rasterization_ = | 1142 content_is_suitable_for_gpu_rasterization_ = |
| 1107 proto.content_is_suitable_for_gpu_rasterization(); | 1143 proto.content_is_suitable_for_gpu_rasterization(); |
| 1108 id_ = proto.id(); | 1144 id_ = proto.id(); |
| 1109 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); | 1145 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); |
| 1110 | 1146 |
| 1111 surface_client_id_ = proto.surface_client_id(); | 1147 surface_client_id_ = proto.surface_client_id(); |
| 1112 next_surface_sequence_ = proto.next_surface_sequence(); | 1148 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1113 } | 1149 } |
| 1114 | 1150 |
| 1115 AnimationHost* LayerTreeHost::animation_host() const { | |
| 1116 return layer_tree_->animation_host(); | |
| 1117 } | |
| 1118 | |
| 1119 } // namespace cc | 1151 } // namespace cc |
| OLD | NEW |