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