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 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 void SetNeedsManageTiles() { manage_tiles_needed_ = true; } | 264 void SetNeedsManageTiles() { manage_tiles_needed_ = true; } |
265 | 265 |
266 void Readback(void* pixels, gfx::Rect rect_in_device_viewport); | 266 void Readback(void* pixels, gfx::Rect rect_in_device_viewport); |
267 | 267 |
268 LayerTreeImpl* active_tree() { return active_tree_.get(); } | 268 LayerTreeImpl* active_tree() { return active_tree_.get(); } |
269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } | 269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } | 270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } | 271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } | 272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
273 virtual void CreatePendingTree(); | 273 virtual void CreatePendingTree(); |
274 void UpdateVisibleTiles(); | 274 virtual void UpdateVisibleTiles(); |
275 virtual void ActivatePendingTree(); | 275 virtual void ActivatePendingTree(); |
276 | 276 |
277 // Shortcuts to layers on the active tree. | 277 // Shortcuts to layers on the active tree. |
278 LayerImpl* RootLayer() const; | 278 LayerImpl* RootLayer() const; |
279 LayerImpl* RootScrollLayer() const; | 279 LayerImpl* RootScrollLayer() const; |
280 LayerImpl* CurrentlyScrollingLayer() const; | 280 LayerImpl* CurrentlyScrollingLayer() const; |
281 | 281 |
282 virtual void SetVisible(bool visible); | 282 virtual void SetVisible(bool visible); |
283 bool visible() const { return visible_; } | 283 bool visible() const { return visible_; } |
284 | 284 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 406 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
407 | 407 |
408 void CreateUIResource(UIResourceId uid, | 408 void CreateUIResource(UIResourceId uid, |
409 scoped_refptr<UIResourceBitmap> bitmap); | 409 scoped_refptr<UIResourceBitmap> bitmap); |
410 // Deletes a UI resource. May safely be called more than once. | 410 // Deletes a UI resource. May safely be called more than once. |
411 void DeleteUIResource(UIResourceId uid); | 411 void DeleteUIResource(UIResourceId uid); |
412 void DeleteAllUIResources(); | 412 void DeleteAllUIResources(); |
413 | 413 |
414 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; | 414 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; |
415 | 415 |
| 416 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } |
| 417 |
416 protected: | 418 protected: |
417 LayerTreeHostImpl( | 419 LayerTreeHostImpl( |
418 const LayerTreeSettings& settings, | 420 const LayerTreeSettings& settings, |
419 LayerTreeHostImplClient* client, | 421 LayerTreeHostImplClient* client, |
420 Proxy* proxy, | 422 Proxy* proxy, |
421 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 423 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
422 | 424 |
423 // Virtual for testing. | 425 // Virtual for testing. |
424 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 426 virtual void AnimateLayers(base::TimeTicks monotonic_time, |
425 base::Time wall_clock_time); | 427 base::Time wall_clock_time); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 603 |
602 // Optional callback to notify of new tree activations. | 604 // Optional callback to notify of new tree activations. |
603 base::Closure tree_activation_callback_; | 605 base::Closure tree_activation_callback_; |
604 | 606 |
605 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 607 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
606 }; | 608 }; |
607 | 609 |
608 } // namespace cc | 610 } // namespace cc |
609 | 611 |
610 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 612 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |