| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 virtual void BeginMainFrameAborted(CommitEarlyOutReason reason); | 222 virtual void BeginMainFrameAborted(CommitEarlyOutReason reason); |
| 223 virtual void BeginCommit(); | 223 virtual void BeginCommit(); |
| 224 virtual void CommitComplete(); | 224 virtual void CommitComplete(); |
| 225 virtual void Animate(base::TimeTicks monotonic_time); | 225 virtual void Animate(base::TimeTicks monotonic_time); |
| 226 virtual void UpdateAnimationState(bool start_ready_animations); | 226 virtual void UpdateAnimationState(bool start_ready_animations); |
| 227 void ActivateAnimations(); | 227 void ActivateAnimations(); |
| 228 void MainThreadHasStoppedFlinging(); | 228 void MainThreadHasStoppedFlinging(); |
| 229 void DidAnimateScrollOffset(); | 229 void DidAnimateScrollOffset(); |
| 230 void SetViewportDamage(const gfx::Rect& damage_rect); | 230 void SetViewportDamage(const gfx::Rect& damage_rect); |
| 231 | 231 |
| 232 virtual void PrepareTiles(); | 232 virtual bool PrepareTiles(); |
| 233 | 233 |
| 234 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we | 234 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we |
| 235 // should try to avoid displaying the frame. If PrepareToDraw is called, | 235 // should try to avoid displaying the frame. If PrepareToDraw is called, |
| 236 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is | 236 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is |
| 237 // called between the two. | 237 // called between the two. |
| 238 virtual DrawResult PrepareToDraw(FrameData* frame); | 238 virtual DrawResult PrepareToDraw(FrameData* frame); |
| 239 virtual void DrawLayers(FrameData* frame); | 239 virtual void DrawLayers(FrameData* frame); |
| 240 // Must be called if and only if PrepareToDraw was called. | 240 // Must be called if and only if PrepareToDraw was called. |
| 241 void DidDrawAllLayers(const FrameData& frame); | 241 void DidDrawAllLayers(const FrameData& frame); |
| 242 | 242 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 573 |
| 574 BeginFrameTracker current_begin_frame_tracker_; | 574 BeginFrameTracker current_begin_frame_tracker_; |
| 575 | 575 |
| 576 private: | 576 private: |
| 577 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( | 577 gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
| 578 LayerImpl* layer_impl, | 578 LayerImpl* layer_impl, |
| 579 const gfx::PointF& viewport_point, | 579 const gfx::PointF& viewport_point, |
| 580 const gfx::Vector2dF& viewport_delta); | 580 const gfx::Vector2dF& viewport_delta); |
| 581 | 581 |
| 582 void CreateAndSetRenderer(); | 582 void CreateAndSetRenderer(); |
| 583 void CreateAndSetTileManager(); | 583 void CleanUpTileManager(); |
| 584 void DestroyTileManager(); | 584 void RecreateTileManagerResources(); |
| 585 void ReleaseTreeResources(); | 585 void ReleaseTreeResources(); |
| 586 void RecreateTreeResources(); | 586 void RecreateTreeResources(); |
| 587 | 587 |
| 588 void UpdateGpuRasterizationStatus(); | 588 void UpdateGpuRasterizationStatus(); |
| 589 | 589 |
| 590 bool IsSynchronousSingleThreaded() const; | 590 bool IsSynchronousSingleThreaded() const; |
| 591 | 591 |
| 592 Viewport* viewport() { return viewport_.get(); } | 592 Viewport* viewport() { return viewport_.get(); } |
| 593 | 593 |
| 594 // Scroll by preferring to move the outer viewport first, only moving the | 594 // Scroll by preferring to move the outer viewport first, only moving the |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 780 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 781 | 781 |
| 782 scoped_ptr<Viewport> viewport_; | 782 scoped_ptr<Viewport> viewport_; |
| 783 | 783 |
| 784 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 784 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 785 }; | 785 }; |
| 786 | 786 |
| 787 } // namespace cc | 787 } // namespace cc |
| 788 | 788 |
| 789 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 789 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |