[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "cc/layer_tree_impl.h" |
| 6 | |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 7 | #include "base/debug/trace_event.h" |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 8 | #include "cc/layer_tree_host_common.h" |
| 9 | #include "cc/layer_tree_host_impl.h" |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 10 | #include "ui/gfx/vector2d_conversions.h" |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 11 | |
| 12 | namespace cc { |
| 13 | |
[email protected] | 8bef4057 | 2012-12-11 21:38:08 | [diff] [blame] | 14 | LayerTreeImpl::LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl) |
| 15 | : layer_tree_host_impl_(layer_tree_host_impl) |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 16 | , source_frame_number_(-1) |
| 17 | , hud_layer_(0) |
| 18 | , root_scroll_layer_(0) |
| 19 | , currently_scrolling_layer_(0) |
[email protected] | a3029014 | 2013-01-05 01:27:00 | [diff] [blame] | 20 | , background_color_(0) |
| 21 | , has_transparent_background_(false) |
[email protected] | 6f90b9e | 2013-01-17 23:42:00 | [diff] [blame] | 22 | , scrolling_layer_id_from_previous_tree_(0) |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 23 | , contents_textures_purged_(false) |
| 24 | , needs_update_draw_properties_(true) { |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | LayerTreeImpl::~LayerTreeImpl() { |
[email protected] | 361bc00d | 2012-12-14 07:03:24 | [diff] [blame] | 28 | // Need to explicitly clear the tree prior to destroying this so that |
| 29 | // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. |
| 30 | root_layer_.reset(); |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | static LayerImpl* findRootScrollLayer(LayerImpl* layer) |
| 34 | { |
| 35 | if (!layer) |
| 36 | return 0; |
| 37 | |
| 38 | if (layer->scrollable()) |
| 39 | return layer; |
| 40 | |
| 41 | for (size_t i = 0; i < layer->children().size(); ++i) { |
| 42 | LayerImpl* found = findRootScrollLayer(layer->children()[i]); |
| 43 | if (found) |
| 44 | return found; |
| 45 | } |
| 46 | |
| 47 | return 0; |
| 48 | } |
| 49 | |
| 50 | void LayerTreeImpl::SetRootLayer(scoped_ptr<LayerImpl> layer) { |
| 51 | root_layer_ = layer.Pass(); |
[email protected] | 5c4824e1 | 2013-01-12 16:34:53 | [diff] [blame] | 52 | root_scroll_layer_ = NULL; |
| 53 | currently_scrolling_layer_ = NULL; |
| 54 | |
| 55 | layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
| 56 | } |
| 57 | |
| 58 | void LayerTreeImpl::FindRootScrollLayer() { |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 59 | root_scroll_layer_ = findRootScrollLayer(root_layer_.get()); |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 60 | |
| 61 | if (root_layer_ && scrolling_layer_id_from_previous_tree_) { |
| 62 | currently_scrolling_layer_ = LayerTreeHostCommon::findLayerInSubtree( |
| 63 | root_layer_.get(), |
| 64 | scrolling_layer_id_from_previous_tree_); |
| 65 | } |
| 66 | |
| 67 | scrolling_layer_id_from_previous_tree_ = 0; |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | scoped_ptr<LayerImpl> LayerTreeImpl::DetachLayerTree() { |
| 71 | // Clear all data structures that have direct references to the layer tree. |
| 72 | scrolling_layer_id_from_previous_tree_ = |
| 73 | currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0; |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 74 | root_scroll_layer_ = NULL; |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 75 | currently_scrolling_layer_ = NULL; |
| 76 | |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 77 | render_surface_layer_list_.clear(); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 78 | set_needs_update_draw_properties(); |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 79 | return root_layer_.Pass(); |
| 80 | } |
| 81 | |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 82 | LayerImpl* LayerTreeImpl::RootScrollLayer() { |
| 83 | DCHECK(IsActiveTree()); |
| 84 | return root_scroll_layer_; |
| 85 | } |
| 86 | |
| 87 | LayerImpl* LayerTreeImpl::CurrentlyScrollingLayer() { |
| 88 | DCHECK(IsActiveTree()); |
| 89 | return currently_scrolling_layer_; |
| 90 | } |
| 91 | |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 92 | void LayerTreeImpl::ClearCurrentlyScrollingLayer() { |
| 93 | currently_scrolling_layer_ = NULL; |
| 94 | scrolling_layer_id_from_previous_tree_ = 0; |
| 95 | } |
| 96 | |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 97 | void LayerTreeImpl::UpdateMaxScrollOffset() { |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 98 | if (!root_scroll_layer_ || !root_scroll_layer_->children().size()) |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 99 | return; |
| 100 | |
[email protected] | 42ccdbef | 2013-01-21 07:54:54 | [diff] [blame] | 101 | gfx::SizeF view_bounds; |
| 102 | if (!settings().pageScalePinchZoomEnabled) { |
| 103 | view_bounds = device_viewport_size(); |
| 104 | if (LayerImpl* clip_layer = root_scroll_layer_->parent()) { |
| 105 | // Compensate for non-overlay scrollbars. |
| 106 | if (clip_layer->masksToBounds()) |
| 107 | view_bounds = gfx::ScaleSize(clip_layer->bounds(), device_scale_factor()); |
| 108 | } |
[email protected] | a823df8 | 2013-01-10 02:38:17 | [diff] [blame] | 109 | view_bounds.Scale(1 / pinch_zoom_viewport().page_scale_delta()); |
[email protected] | 42ccdbef | 2013-01-21 07:54:54 | [diff] [blame] | 110 | } else { |
| 111 | view_bounds = layout_viewport_size(); |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 112 | } |
| 113 | |
[email protected] | 42ccdbef | 2013-01-21 07:54:54 | [diff] [blame] | 114 | gfx::Vector2dF max_scroll = gfx::Rect(ScrollableSize()).bottom_right() - |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 115 | gfx::RectF(view_bounds).bottom_right(); |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 116 | |
| 117 | // The viewport may be larger than the contents in some cases, such as |
| 118 | // having a vertical scrollbar but no horizontal overflow. |
| 119 | max_scroll.ClampToMin(gfx::Vector2dF()); |
| 120 | |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 121 | root_scroll_layer_->setMaxScrollOffset(gfx::ToFlooredVector2d(max_scroll)); |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 122 | } |
| 123 | |
[email protected] | 4c9bb95 | 2013-01-27 05:41:18 | [diff] [blame^] | 124 | struct UpdateTilePrioritiesForLayer { |
| 125 | void operator()(LayerImpl *layer) { |
| 126 | layer->updateTilePriorities(); |
| 127 | } |
| 128 | }; |
| 129 | |
| 130 | void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) { |
| 131 | if (!needs_update_draw_properties_) { |
| 132 | if (reason == UPDATE_ACTIVE_TREE_FOR_DRAW && RootLayer()) |
| 133 | LayerTreeHostCommon::callFunctionForSubtree<UpdateTilePrioritiesForLayer>( |
| 134 | RootLayer()); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 135 | return; |
[email protected] | 4c9bb95 | 2013-01-27 05:41:18 | [diff] [blame^] | 136 | } |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 137 | |
| 138 | needs_update_draw_properties_ = false; |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 139 | render_surface_layer_list_.clear(); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 140 | |
| 141 | // For maxTextureSize. |
| 142 | if (!layer_tree_host_impl_->renderer()) |
| 143 | return; |
| 144 | |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 145 | if (!RootLayer()) |
| 146 | return; |
| 147 | |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 148 | if (root_scroll_layer_) { |
| 149 | root_scroll_layer_->setImplTransform( |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 150 | layer_tree_host_impl_->implTransform()); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 151 | // Setting the impl transform re-sets this. |
| 152 | needs_update_draw_properties_ = false; |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | { |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 156 | TRACE_EVENT1("cc", "LayerTreeImpl::UpdateDrawProperties", "IsActive", IsActiveTree()); |
[email protected] | 4c9bb95 | 2013-01-27 05:41:18 | [diff] [blame^] | 157 | bool update_tile_priorities = |
| 158 | reason == UPDATE_PENDING_TREE || |
| 159 | reason == UPDATE_ACTIVE_TREE_FOR_DRAW; |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 160 | LayerTreeHostCommon::calculateDrawProperties( |
| 161 | RootLayer(), |
| 162 | device_viewport_size(), |
| 163 | device_scale_factor(), |
[email protected] | d8fd053 | 2013-01-26 02:09:49 | [diff] [blame] | 164 | pinch_zoom_viewport().total_page_scale_factor(), |
[email protected] | f677653 | 2012-12-21 20:24:33 | [diff] [blame] | 165 | MaxTextureSize(), |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 166 | settings().canUseLCDText, |
[email protected] | 4c9bb95 | 2013-01-27 05:41:18 | [diff] [blame^] | 167 | render_surface_layer_list_, |
| 168 | update_tile_priorities); |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 169 | } |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 170 | |
| 171 | DCHECK(!needs_update_draw_properties_) << |
| 172 | "calcDrawProperties should not set_needs_update_draw_properties()"; |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | static void ClearRenderSurfacesOnLayerImplRecursive(LayerImpl* current) |
| 176 | { |
| 177 | DCHECK(current); |
| 178 | for (size_t i = 0; i < current->children().size(); ++i) |
| 179 | ClearRenderSurfacesOnLayerImplRecursive(current->children()[i]); |
| 180 | current->clearRenderSurface(); |
| 181 | } |
| 182 | |
| 183 | void LayerTreeImpl::ClearRenderSurfaces() { |
| 184 | ClearRenderSurfacesOnLayerImplRecursive(RootLayer()); |
| 185 | render_surface_layer_list_.clear(); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 186 | set_needs_update_draw_properties(); |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 187 | } |
| 188 | |
[email protected] | b0a917c8d | 2013-01-12 17:42:25 | [diff] [blame] | 189 | bool LayerTreeImpl::AreVisibleResourcesReady() const { |
| 190 | TRACE_EVENT0("cc", "LayerTreeImpl::AreVisibleResourcesReady"); |
| 191 | |
| 192 | typedef LayerIterator<LayerImpl, |
| 193 | std::vector<LayerImpl*>, |
| 194 | RenderSurfaceImpl, |
| 195 | LayerIteratorActions::BackToFront> LayerIteratorType; |
| 196 | LayerIteratorType end = LayerIteratorType::end(&render_surface_layer_list_); |
| 197 | for (LayerIteratorType it = LayerIteratorType::begin( |
| 198 | &render_surface_layer_list_); it != end; ++it) { |
| 199 | if (it.representsItself() && !(*it)->areVisibleResourcesReady()) |
| 200 | return false; |
| 201 | } |
| 202 | |
| 203 | return true; |
| 204 | } |
| 205 | |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 206 | const LayerTreeImpl::LayerList& LayerTreeImpl::RenderSurfaceLayerList() const { |
| 207 | // If this assert triggers, then the list is dirty. |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 208 | DCHECK(!needs_update_draw_properties_); |
[email protected] | 76ffd9e | 2012-12-20 19:12:47 | [diff] [blame] | 209 | return render_surface_layer_list_; |
| 210 | } |
| 211 | |
[email protected] | 42ccdbef | 2013-01-21 07:54:54 | [diff] [blame] | 212 | gfx::Size LayerTreeImpl::ScrollableSize() const { |
[email protected] | c4d467a | 2013-01-21 03:21:01 | [diff] [blame] | 213 | if (!root_scroll_layer_ || root_scroll_layer_->children().empty()) |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 214 | return gfx::Size(); |
[email protected] | c4d467a | 2013-01-21 03:21:01 | [diff] [blame] | 215 | return root_scroll_layer_->children()[0]->bounds(); |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 216 | } |
| 217 | |
[email protected] | 361bc00d | 2012-12-14 07:03:24 | [diff] [blame] | 218 | LayerImpl* LayerTreeImpl::LayerById(int id) { |
| 219 | LayerIdMap::iterator iter = layer_id_map_.find(id); |
| 220 | return iter != layer_id_map_.end() ? iter->second : NULL; |
| 221 | } |
| 222 | |
| 223 | void LayerTreeImpl::RegisterLayer(LayerImpl* layer) { |
| 224 | DCHECK(!LayerById(layer->id())); |
| 225 | layer_id_map_[layer->id()] = layer; |
| 226 | } |
| 227 | |
| 228 | void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) { |
| 229 | DCHECK(LayerById(layer->id())); |
| 230 | layer_id_map_.erase(layer->id()); |
| 231 | } |
| 232 | |
[email protected] | 1e0f8d6 | 2013-01-09 07:41:35 | [diff] [blame] | 233 | void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pendingTree) { |
| 234 | int id = currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0; |
| 235 | pendingTree->set_currently_scrolling_layer( |
| 236 | LayerTreeHostCommon::findLayerInSubtree(pendingTree->RootLayer(), id)); |
| 237 | } |
| 238 | |
[email protected] | 37386f05 | 2013-01-13 00:42:22 | [diff] [blame] | 239 | static void DidBecomeActiveRecursive(LayerImpl* layer) { |
| 240 | layer->didBecomeActive(); |
| 241 | for (size_t i = 0; i < layer->children().size(); ++i) |
| 242 | DidBecomeActiveRecursive(layer->children()[i]); |
| 243 | } |
| 244 | |
| 245 | void LayerTreeImpl::DidBecomeActive() { |
| 246 | if (RootLayer()) |
| 247 | DidBecomeActiveRecursive(RootLayer()); |
[email protected] | 69b50ec | 2013-01-19 04:58:01 | [diff] [blame] | 248 | FindRootScrollLayer(); |
| 249 | UpdateMaxScrollOffset(); |
[email protected] | 37386f05 | 2013-01-13 00:42:22 | [diff] [blame] | 250 | } |
| 251 | |
[email protected] | 6f90b9e | 2013-01-17 23:42:00 | [diff] [blame] | 252 | bool LayerTreeImpl::ContentsTexturesPurged() const { |
| 253 | return contents_textures_purged_; |
| 254 | } |
| 255 | |
| 256 | void LayerTreeImpl::SetContentsTexturesPurged() { |
| 257 | contents_textures_purged_ = true; |
| 258 | layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
| 259 | } |
| 260 | |
| 261 | void LayerTreeImpl::ResetContentsTexturesPurged() { |
| 262 | contents_textures_purged_ = false; |
| 263 | layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
| 264 | } |
| 265 | |
[email protected] | 48871fc | 2013-01-23 07:36:51 | [diff] [blame] | 266 | Proxy* LayerTreeImpl::proxy() const { |
| 267 | return layer_tree_host_impl_->proxy(); |
| 268 | } |
| 269 | |
[email protected] | ff762fb | 2012-12-12 19:18:37 | [diff] [blame] | 270 | const LayerTreeSettings& LayerTreeImpl::settings() const { |
| 271 | return layer_tree_host_impl_->settings(); |
| 272 | } |
| 273 | |
| 274 | OutputSurface* LayerTreeImpl::output_surface() const { |
| 275 | return layer_tree_host_impl_->outputSurface(); |
| 276 | } |
| 277 | |
| 278 | ResourceProvider* LayerTreeImpl::resource_provider() const { |
| 279 | return layer_tree_host_impl_->resourceProvider(); |
| 280 | } |
| 281 | |
| 282 | TileManager* LayerTreeImpl::tile_manager() const { |
| 283 | return layer_tree_host_impl_->tileManager(); |
| 284 | } |
| 285 | |
| 286 | FrameRateCounter* LayerTreeImpl::frame_rate_counter() const { |
| 287 | return layer_tree_host_impl_->fpsCounter(); |
| 288 | } |
| 289 | |
[email protected] | 71691c2 | 2013-01-18 03:14:22 | [diff] [blame] | 290 | PaintTimeCounter* LayerTreeImpl::paint_time_counter() const { |
| 291 | return layer_tree_host_impl_->paintTimeCounter(); |
| 292 | } |
| 293 | |
[email protected] | f117a4c | 2012-12-16 04:53:10 | [diff] [blame] | 294 | bool LayerTreeImpl::IsActiveTree() const { |
| 295 | return layer_tree_host_impl_->activeTree() == this; |
| 296 | } |
| 297 | |
| 298 | bool LayerTreeImpl::IsPendingTree() const { |
| 299 | return layer_tree_host_impl_->pendingTree() == this; |
| 300 | } |
| 301 | |
[email protected] | 48871fc | 2013-01-23 07:36:51 | [diff] [blame] | 302 | bool LayerTreeImpl::IsRecycleTree() const { |
| 303 | return layer_tree_host_impl_->recycleTree() == this; |
| 304 | } |
| 305 | |
[email protected] | f117a4c | 2012-12-16 04:53:10 | [diff] [blame] | 306 | LayerImpl* LayerTreeImpl::FindActiveTreeLayerById(int id) { |
| 307 | LayerTreeImpl* tree = layer_tree_host_impl_->activeTree(); |
| 308 | if (!tree) |
| 309 | return NULL; |
| 310 | return tree->LayerById(id); |
| 311 | } |
| 312 | |
| 313 | LayerImpl* LayerTreeImpl::FindPendingTreeLayerById(int id) { |
| 314 | LayerTreeImpl* tree = layer_tree_host_impl_->pendingTree(); |
| 315 | if (!tree) |
| 316 | return NULL; |
| 317 | return tree->LayerById(id); |
| 318 | } |
| 319 | |
[email protected] | f677653 | 2012-12-21 20:24:33 | [diff] [blame] | 320 | int LayerTreeImpl::MaxTextureSize() const { |
| 321 | return layer_tree_host_impl_->rendererCapabilities().maxTextureSize; |
| 322 | } |
| 323 | |
[email protected] | 166db5c8 | 2013-01-09 23:54:31 | [diff] [blame] | 324 | bool LayerTreeImpl::PinchGestureActive() const { |
| 325 | return layer_tree_host_impl_->pinchGestureActive(); |
| 326 | } |
| 327 | |
[email protected] | ff762fb | 2012-12-12 19:18:37 | [diff] [blame] | 328 | void LayerTreeImpl::SetNeedsRedraw() { |
| 329 | layer_tree_host_impl_->setNeedsRedraw(); |
| 330 | } |
| 331 | |
[email protected] | ff762fb | 2012-12-12 19:18:37 | [diff] [blame] | 332 | const LayerTreeDebugState& LayerTreeImpl::debug_state() const { |
| 333 | return layer_tree_host_impl_->debugState(); |
| 334 | } |
| 335 | |
| 336 | float LayerTreeImpl::device_scale_factor() const { |
| 337 | return layer_tree_host_impl_->deviceScaleFactor(); |
| 338 | } |
| 339 | |
| 340 | const gfx::Size& LayerTreeImpl::device_viewport_size() const { |
| 341 | return layer_tree_host_impl_->deviceViewportSize(); |
| 342 | } |
| 343 | |
| 344 | const gfx::Size& LayerTreeImpl::layout_viewport_size() const { |
| 345 | return layer_tree_host_impl_->layoutViewportSize(); |
| 346 | } |
| 347 | |
| 348 | std::string LayerTreeImpl::layer_tree_as_text() const { |
| 349 | return layer_tree_host_impl_->layerTreeAsText(); |
| 350 | } |
| 351 | |
| 352 | DebugRectHistory* LayerTreeImpl::debug_rect_history() const { |
| 353 | return layer_tree_host_impl_->debugRectHistory(); |
| 354 | } |
| 355 | |
[email protected] | de4afb5e | 2012-12-20 00:11:34 | [diff] [blame] | 356 | AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { |
| 357 | return layer_tree_host_impl_->animationRegistrar(); |
| 358 | } |
[email protected] | ff762fb | 2012-12-12 19:18:37 | [diff] [blame] | 359 | |
[email protected] | caa567d | 2012-12-20 07:56:16 | [diff] [blame] | 360 | const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { |
| 361 | return layer_tree_host_impl_->pinchZoomViewport(); |
| 362 | } |
| 363 | |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 364 | } // namespace cc |