| 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_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 scoped_ptr<AnimationEventsVector> events, | 58 scoped_ptr<AnimationEventsVector> events, |
| 59 base::Time wall_clock_time) = 0; | 59 base::Time wall_clock_time) = 0; |
| 60 // Returns true if resources were deleted by this call. | 60 // Returns true if resources were deleted by this call. |
| 61 virtual bool ReduceContentsTextureMemoryOnImplThread( | 61 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 62 size_t limit_bytes, | 62 size_t limit_bytes, |
| 63 int priority_cutoff) = 0; | 63 int priority_cutoff) = 0; |
| 64 virtual void ReduceWastedContentsTextureMemoryOnImplThread() = 0; | 64 virtual void ReduceWastedContentsTextureMemoryOnImplThread() = 0; |
| 65 virtual void SendManagedMemoryStats() = 0; | 65 virtual void SendManagedMemoryStats() = 0; |
| 66 virtual bool IsInsideDraw() = 0; | 66 virtual bool IsInsideDraw() = 0; |
| 67 virtual void RenewTreePriority() = 0; | 67 virtual void RenewTreePriority() = 0; |
| 68 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 71 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 71 // state. | 72 // state. |
| 72 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, | 73 class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, |
| 73 public RendererClient, | 74 public RendererClient, |
| 74 public TileManagerClient, | 75 public TileManagerClient, |
| 75 public OutputSurfaceClient, | 76 public OutputSurfaceClient, |
| 76 public TopControlsManagerClient { | 77 public TopControlsManagerClient { |
| 77 typedef std::vector<LayerImpl*> LayerList; | 78 typedef std::vector<LayerImpl*> LayerList; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 100 base::TimeTicks start_time, | 101 base::TimeTicks start_time, |
| 101 base::TimeDelta duration) OVERRIDE; | 102 base::TimeDelta duration) OVERRIDE; |
| 102 virtual void ScheduleAnimation() OVERRIDE; | 103 virtual void ScheduleAnimation() OVERRIDE; |
| 103 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_port) OVERRIDE; | 104 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_port) OVERRIDE; |
| 104 | 105 |
| 105 // TopControlsManagerClient implementation. | 106 // TopControlsManagerClient implementation. |
| 106 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; | 107 virtual void setActiveTreeNeedsUpdateDrawProperties() OVERRIDE; |
| 107 virtual void setNeedsRedraw() OVERRIDE; | 108 virtual void setNeedsRedraw() OVERRIDE; |
| 108 virtual bool haveRootScrollLayer() const OVERRIDE; | 109 virtual bool haveRootScrollLayer() const OVERRIDE; |
| 109 | 110 |
| 111 void StartScrollbarAnimation(base::TimeTicks now); |
| 112 |
| 110 struct CC_EXPORT FrameData : public RenderPassSink { | 113 struct CC_EXPORT FrameData : public RenderPassSink { |
| 111 FrameData(); | 114 FrameData(); |
| 112 ~FrameData(); | 115 ~FrameData(); |
| 113 | 116 |
| 114 std::vector<gfx::Rect> occluding_screen_space_rects; | 117 std::vector<gfx::Rect> occluding_screen_space_rects; |
| 115 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 118 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
| 116 RenderPassList render_passes; | 119 RenderPassList render_passes; |
| 117 RenderPassIdHashMap render_passes_by_id; | 120 RenderPassIdHashMap render_passes_by_id; |
| 118 const LayerList* render_surface_layer_list; | 121 const LayerList* render_surface_layer_list; |
| 119 LayerList will_draw_layers; | 122 LayerList will_draw_layers; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 377 |
| 375 void AnimateScrollbarsRecursive(LayerImpl* layer, | 378 void AnimateScrollbarsRecursive(LayerImpl* layer, |
| 376 base::TimeTicks time); | 379 base::TimeTicks time); |
| 377 | 380 |
| 378 void DumpRenderSurfaces(std::string* str, | 381 void DumpRenderSurfaces(std::string* str, |
| 379 int indent, | 382 int indent, |
| 380 const LayerImpl* layer) const; | 383 const LayerImpl* layer) const; |
| 381 | 384 |
| 382 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); | 385 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); |
| 383 | 386 |
| 387 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); |
| 388 |
| 384 scoped_ptr<OutputSurface> output_surface_; | 389 scoped_ptr<OutputSurface> output_surface_; |
| 385 scoped_ptr<ResourceProvider> resource_provider_; | 390 scoped_ptr<ResourceProvider> resource_provider_; |
| 386 scoped_ptr<Renderer> renderer_; | 391 scoped_ptr<Renderer> renderer_; |
| 387 scoped_ptr<TileManager> tile_manager_; | 392 scoped_ptr<TileManager> tile_manager_; |
| 388 | 393 |
| 389 // Tree currently being drawn. | 394 // Tree currently being drawn. |
| 390 scoped_ptr<LayerTreeImpl> active_tree_; | 395 scoped_ptr<LayerTreeImpl> active_tree_; |
| 391 | 396 |
| 392 // In impl-side painting mode, tree with possibly incomplete rasterized | 397 // In impl-side painting mode, tree with possibly incomplete rasterized |
| 393 // content. May be promoted to active by ActivatePendingTreeIfNeeded(). | 398 // content. May be promoted to active by ActivatePendingTreeIfNeeded(). |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 base::TimeTicks current_frame_time_; | 446 base::TimeTicks current_frame_time_; |
| 442 | 447 |
| 443 scoped_ptr<AnimationRegistrar> animation_registrar_; | 448 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 444 | 449 |
| 445 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 450 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 446 }; | 451 }; |
| 447 | 452 |
| 448 } // namespace cc | 453 } // namespace cc |
| 449 | 454 |
| 450 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 455 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |