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_in_process.h" | 5 #include "cc/trees/layer_tree_host_in_process.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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 // controls from clamping the layout viewport both on the compositor and | 880 // controls from clamping the layout viewport both on the compositor and |
881 // on the main thread. | 881 // on the main thread. |
882 ApplyViewportDeltas(info); | 882 ApplyViewportDeltas(info); |
883 } | 883 } |
884 | 884 |
885 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() | 885 const base::WeakPtr<InputHandler>& LayerTreeHostInProcess::GetInputHandler() |
886 const { | 886 const { |
887 return input_handler_weak_ptr_; | 887 return input_handler_weak_ptr_; |
888 } | 888 } |
889 | 889 |
890 void LayerTreeHostInProcess::UpdateTopControlsState( | 890 void LayerTreeHostInProcess::UpdateBrowserControlsState( |
891 TopControlsState constraints, | 891 BrowserControlsState constraints, |
892 TopControlsState current, | 892 BrowserControlsState current, |
893 bool animate) { | 893 bool animate) { |
894 // Top controls are only used in threaded or remote mode. | 894 // Browser controls are only used in threaded or remote mode. |
895 DCHECK(IsThreaded() || IsRemoteServer()); | 895 DCHECK(IsThreaded() || IsRemoteServer()); |
896 proxy_->UpdateTopControlsState(constraints, current, animate); | 896 proxy_->UpdateBrowserControlsState(constraints, current, animate); |
897 } | 897 } |
898 | 898 |
899 void LayerTreeHostInProcess::AnimateLayers(base::TimeTicks monotonic_time) { | 899 void LayerTreeHostInProcess::AnimateLayers(base::TimeTicks monotonic_time) { |
900 AnimationHost* animation_host = layer_tree_->animation_host(); | 900 AnimationHost* animation_host = layer_tree_->animation_host(); |
901 std::unique_ptr<AnimationEvents> events = animation_host->CreateEvents(); | 901 std::unique_ptr<AnimationEvents> events = animation_host->CreateEvents(); |
902 | 902 |
903 if (animation_host->AnimateLayers(monotonic_time)) | 903 if (animation_host->AnimateLayers(monotonic_time)) |
904 animation_host->UpdateAnimationState(true, events.get()); | 904 animation_host->UpdateAnimationState(true, events.get()); |
905 | 905 |
906 if (!events->events_.empty()) | 906 if (!events->events_.empty()) |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 | 1029 |
1030 debug_state_.FromProtobuf(proto.debug_state()); | 1030 debug_state_.FromProtobuf(proto.debug_state()); |
1031 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); | 1031 has_gpu_rasterization_trigger_ = proto.has_gpu_rasterization_trigger(); |
1032 content_is_suitable_for_gpu_rasterization_ = | 1032 content_is_suitable_for_gpu_rasterization_ = |
1033 proto.content_is_suitable_for_gpu_rasterization(); | 1033 proto.content_is_suitable_for_gpu_rasterization(); |
1034 id_ = proto.id(); | 1034 id_ = proto.id(); |
1035 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); | 1035 next_commit_forces_redraw_ = proto.next_commit_forces_redraw(); |
1036 } | 1036 } |
1037 | 1037 |
1038 } // namespace cc | 1038 } // namespace cc |
OLD | NEW |