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/layer_tree_impl.h" | 5 #include "cc/layer_tree_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/layer_tree_host_common.h" | 8 #include "cc/layer_tree_host_common.h" |
9 #include "cc/layer_tree_host_impl.h" | 9 #include "cc/layer_tree_host_impl.h" |
10 #include "ui/gfx/vector2d_conversions.h" | 10 #include "ui/gfx/vector2d_conversions.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 max_scroll.ClampToMin(gfx::Vector2dF()); | 109 max_scroll.ClampToMin(gfx::Vector2dF()); |
110 | 110 |
111 root_scroll_layer()->setMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll)); | 111 root_scroll_layer()->setMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll)); |
112 } | 112 } |
113 | 113 |
114 void LayerTreeImpl::UpdateDrawProperties() { | 114 void LayerTreeImpl::UpdateDrawProperties() { |
115 render_surface_layer_list_.clear(); | 115 render_surface_layer_list_.clear(); |
116 if (!RootLayer()) | 116 if (!RootLayer()) |
117 return; | 117 return; |
118 | 118 |
119 if (root_scroll_layer()) { | 119 for (size_t i = 0; i < RootLayer()->children().size(); ++i) { |
120 root_scroll_layer()->setImplTransform( | 120 LayerImpl* layerImpl = RootLayer()->children()[i]; |
121 layer_tree_host_impl_->implTransform()); | 121 layerImpl->setImplTransform(layer_tree_host_impl_->implTransform()); |
Ian Vollick
2013/01/15 20:33:48
Please add a comment here that the implTransform i
| |
122 } | 122 } |
123 | 123 |
124 { | 124 { |
125 TRACE_EVENT0("cc", "LayerTreeImpl::UpdateDrawProperties"); | 125 TRACE_EVENT0("cc", "LayerTreeImpl::UpdateDrawProperties"); |
126 LayerTreeHostCommon::calculateDrawProperties( | 126 LayerTreeHostCommon::calculateDrawProperties( |
127 RootLayer(), | 127 RootLayer(), |
128 device_viewport_size(), | 128 device_viewport_size(), |
129 device_scale_factor(), | 129 device_scale_factor(), |
130 pinch_zoom_viewport().page_scale_factor(), | 130 pinch_zoom_viewport().page_scale_factor(), |
131 MaxTextureSize(), | 131 MaxTextureSize(), |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 | 267 |
268 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { | 268 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { |
269 return layer_tree_host_impl_->animationRegistrar(); | 269 return layer_tree_host_impl_->animationRegistrar(); |
270 } | 270 } |
271 | 271 |
272 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { | 272 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { |
273 return layer_tree_host_impl_->pinchZoomViewport(); | 273 return layer_tree_host_impl_->pinchZoomViewport(); |
274 } | 274 } |
275 | 275 |
276 } // namespace cc | 276 } // namespace cc |
OLD | NEW |