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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 in_paint_layer_contents_ = false; | 957 in_paint_layer_contents_ = false; |
958 | 958 |
959 rendering_stats_instrumentation_->AddStats(stats); | 959 rendering_stats_instrumentation_->AddStats(stats); |
960 | 960 |
961 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); | 961 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); |
962 | 962 |
963 return need_more_updates; | 963 return need_more_updates; |
964 } | 964 } |
965 | 965 |
966 void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) { | 966 void LayerTreeHost::ApplyScrollAndScale(const ScrollAndScaleSet& info) { |
| 967 TRACE_EVENT0("cc", __PRETTY_FUNCTION__); |
967 if (!root_layer_.get()) | 968 if (!root_layer_.get()) |
968 return; | 969 return; |
969 | 970 TRACE_EVENT0("cc", __PRETTY_FUNCTION__); |
970 Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get()); | 971 Layer* root_scroll_layer = FindFirstScrollableLayer(root_layer_.get()); |
971 gfx::Vector2d root_scroll_delta; | 972 gfx::Vector2d root_scroll_delta; |
972 | 973 |
973 for (size_t i = 0; i < info.scrolls.size(); ++i) { | 974 for (size_t i = 0; i < info.scrolls.size(); ++i) { |
974 Layer* layer = | 975 Layer* layer = |
975 LayerTreeHostCommon::FindLayerInSubtree(root_layer_.get(), | 976 LayerTreeHostCommon::FindLayerInSubtree(root_layer_.get(), |
976 info.scrolls[i].layer_id); | 977 info.scrolls[i].layer_id); |
977 if (!layer) | 978 if (!layer) |
978 continue; | 979 continue; |
979 if (layer == root_scroll_layer) { | 980 if (layer == root_scroll_layer) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 bool start_ready_animations = true; | 1082 bool start_ready_animations = true; |
1082 (*iter).second->UpdateState(start_ready_animations, NULL); | 1083 (*iter).second->UpdateState(start_ready_animations, NULL); |
1083 } | 1084 } |
1084 } | 1085 } |
1085 | 1086 |
1086 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1087 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1087 return proxy_->CapturePicture(); | 1088 return proxy_->CapturePicture(); |
1088 } | 1089 } |
1089 | 1090 |
1090 } // namespace cc | 1091 } // namespace cc |
OLD | NEW |