| 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_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 106 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 107 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 107 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 108 virtual ~LayerTreeHost(); | 108 virtual ~LayerTreeHost(); |
| 109 | 109 |
| 110 void SetLayerTreeHostClientReady(); | 110 void SetLayerTreeHostClientReady(); |
| 111 | 111 |
| 112 // LayerTreeHost interface to Proxy. | 112 // LayerTreeHost interface to Proxy. |
| 113 void WillBeginMainFrame(); | 113 void WillBeginMainFrame(); |
| 114 void DidBeginMainFrame(); | 114 void DidBeginMainFrame(); |
| 115 void BeginMainFrame(const BeginFrameArgs& args); | 115 void BeginMainFrame(const BeginFrameArgs& args); |
| 116 void BeginMainFrameNotExpectedSoon(); | |
| 117 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); | 116 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); |
| 118 void DidStopFlinging(); | 117 void DidStopFlinging(); |
| 119 void Layout(); | 118 void Layout(); |
| 120 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); | 119 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| 121 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); | 120 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| 122 void WillCommit(); | 121 void WillCommit(); |
| 123 void CommitComplete(); | 122 void CommitComplete(); |
| 124 void SetOutputSurface(scoped_ptr<OutputSurface> output_surface); | 123 void SetOutputSurface(scoped_ptr<OutputSurface> output_surface); |
| 125 void RequestNewOutputSurface(); | 124 void RequestNewOutputSurface(); |
| 126 void DidInitializeOutputSurface(); | 125 void DidInitializeOutputSurface(); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 scoped_ptr<AnimationRegistrar> animation_registrar_; | 440 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 442 | 441 |
| 443 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 442 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 444 | 443 |
| 445 // If set, then page scale animation has completed, but the client hasn't been | 444 // If set, then page scale animation has completed, but the client hasn't been |
| 446 // notified about it yet. | 445 // notified about it yet. |
| 447 bool did_complete_scale_animation_; | 446 bool did_complete_scale_animation_; |
| 448 | 447 |
| 449 bool in_paint_layer_contents_; | 448 bool in_paint_layer_contents_; |
| 450 | 449 |
| 450 static const int kTotalFramesToUseForLCDTextMetrics = 50; |
| 451 int total_frames_used_for_lcd_text_metrics_; |
| 452 |
| 453 struct LCDTextMetrics { |
| 454 LCDTextMetrics() |
| 455 : total_num_cc_layers(0), |
| 456 total_num_cc_layers_can_use_lcd_text(0), |
| 457 total_num_cc_layers_will_use_lcd_text(0) {} |
| 458 |
| 459 int64 total_num_cc_layers; |
| 460 int64 total_num_cc_layers_can_use_lcd_text; |
| 461 int64 total_num_cc_layers_will_use_lcd_text; |
| 462 }; |
| 463 LCDTextMetrics lcd_text_metrics_; |
| 451 int id_; | 464 int id_; |
| 452 bool next_commit_forces_redraw_; | 465 bool next_commit_forces_redraw_; |
| 453 | 466 |
| 454 scoped_refptr<Layer> overscroll_elasticity_layer_; | 467 scoped_refptr<Layer> overscroll_elasticity_layer_; |
| 455 scoped_refptr<Layer> page_scale_layer_; | 468 scoped_refptr<Layer> page_scale_layer_; |
| 456 scoped_refptr<Layer> inner_viewport_scroll_layer_; | 469 scoped_refptr<Layer> inner_viewport_scroll_layer_; |
| 457 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 470 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
| 458 | 471 |
| 459 LayerSelectionBound selection_start_; | 472 LayerSelectionBound selection_start_; |
| 460 LayerSelectionBound selection_end_; | 473 LayerSelectionBound selection_end_; |
| 461 | 474 |
| 462 SharedBitmapManager* shared_bitmap_manager_; | 475 SharedBitmapManager* shared_bitmap_manager_; |
| 463 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 476 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
| 464 | 477 |
| 465 ScopedPtrVector<SwapPromise> swap_promise_list_; | 478 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 466 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 479 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 467 | 480 |
| 468 uint32_t surface_id_namespace_; | 481 uint32_t surface_id_namespace_; |
| 469 uint32_t next_surface_sequence_; | 482 uint32_t next_surface_sequence_; |
| 470 | 483 |
| 471 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 484 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 472 }; | 485 }; |
| 473 | 486 |
| 474 } // namespace cc | 487 } // namespace cc |
| 475 | 488 |
| 476 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 489 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |