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 <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 } | 1044 } |
1045 | 1045 |
1046 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { | 1046 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { |
1047 if (device_scale_factor == device_scale_factor_) | 1047 if (device_scale_factor == device_scale_factor_) |
1048 return; | 1048 return; |
1049 device_scale_factor_ = device_scale_factor; | 1049 device_scale_factor_ = device_scale_factor; |
1050 | 1050 |
1051 SetNeedsCommit(); | 1051 SetNeedsCommit(); |
1052 } | 1052 } |
1053 | 1053 |
1054 void LayerTreeHost::UpdateTopControlsState(bool enable_hiding, | 1054 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, |
1055 bool enable_showing, | 1055 TopControlsState current, |
1056 bool animate) { | 1056 bool animate) { |
1057 if (!settings_.calculate_top_controls_position) | 1057 if (!settings_.calculate_top_controls_position) |
1058 return; | 1058 return; |
1059 | 1059 |
1060 // Top controls are only used in threaded mode. | 1060 // Top controls are only used in threaded mode. |
1061 proxy_->ImplThread()->PostTask( | 1061 proxy_->ImplThread()->PostTask( |
1062 base::Bind(&TopControlsManager::UpdateTopControlsState, | 1062 base::Bind(&TopControlsManager::UpdateTopControlsState, |
1063 top_controls_manager_weak_ptr_, | 1063 top_controls_manager_weak_ptr_, |
1064 enable_hiding, | 1064 constraints, |
1065 enable_showing, | 1065 current, |
1066 animate)); | 1066 animate)); |
1067 } | 1067 } |
1068 | 1068 |
1069 bool LayerTreeHost::BlocksPendingCommit() const { | 1069 bool LayerTreeHost::BlocksPendingCommit() const { |
1070 if (!root_layer_) | 1070 if (!root_layer_) |
1071 return false; | 1071 return false; |
1072 return root_layer_->BlocksPendingCommitRecursive(); | 1072 return root_layer_->BlocksPendingCommitRecursive(); |
1073 } | 1073 } |
1074 | 1074 |
1075 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { | 1075 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { |
(...skipping 20 matching lines...) Expand all Loading... |
1096 bool start_ready_animations = true; | 1096 bool start_ready_animations = true; |
1097 (*iter).second->UpdateState(start_ready_animations, NULL); | 1097 (*iter).second->UpdateState(start_ready_animations, NULL); |
1098 } | 1098 } |
1099 } | 1099 } |
1100 | 1100 |
1101 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1101 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1102 return proxy_->CapturePicture(); | 1102 return proxy_->CapturePicture(); |
1103 } | 1103 } |
1104 | 1104 |
1105 } // namespace cc | 1105 } // namespace cc |
OLD | NEW |