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 <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 void DidFailToInitializeOutputSurface(); | 129 void DidFailToInitializeOutputSurface(); |
130 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 130 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
131 LayerTreeHostImplClient* client); | 131 LayerTreeHostImplClient* client); |
132 void DidLoseOutputSurface(); | 132 void DidLoseOutputSurface(); |
133 bool output_surface_lost() const { return output_surface_lost_; } | 133 bool output_surface_lost() const { return output_surface_lost_; } |
134 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } | 134 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } |
135 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } | 135 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } |
136 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); | 136 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); |
137 bool UpdateLayers(ResourceUpdateQueue* queue); | 137 bool UpdateLayers(ResourceUpdateQueue* queue); |
138 | 138 |
| 139 // Called when the compositor completed page scale animation. |
| 140 void DidCompletePageScaleAnimation(); |
| 141 |
139 LayerTreeHostClient* client() { return client_; } | 142 LayerTreeHostClient* client() { return client_; } |
140 const base::WeakPtr<InputHandler>& GetInputHandler() { | 143 const base::WeakPtr<InputHandler>& GetInputHandler() { |
141 return input_handler_weak_ptr_; | 144 return input_handler_weak_ptr_; |
142 } | 145 } |
143 | 146 |
144 void NotifyInputThrottledUntilCommit(); | 147 void NotifyInputThrottledUntilCommit(); |
145 | 148 |
146 void Composite(base::TimeTicks frame_begin_time); | 149 void Composite(base::TimeTicks frame_begin_time); |
147 | 150 |
148 void FinishAllRendering(); | 151 void FinishAllRendering(); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 // covered by layers. | 444 // covered by layers. |
442 scoped_ptr<ScopedUIResource> overhang_ui_resource_; | 445 scoped_ptr<ScopedUIResource> overhang_ui_resource_; |
443 | 446 |
444 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 447 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
445 size_t partial_texture_update_requests_; | 448 size_t partial_texture_update_requests_; |
446 | 449 |
447 scoped_ptr<AnimationRegistrar> animation_registrar_; | 450 scoped_ptr<AnimationRegistrar> animation_registrar_; |
448 | 451 |
449 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 452 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
450 | 453 |
| 454 // If set, then page scale animation has completed, but the client hasn't been |
| 455 // notified about it yet. |
| 456 bool did_complete_scale_animation_; |
| 457 |
451 bool in_paint_layer_contents_; | 458 bool in_paint_layer_contents_; |
452 | 459 |
453 static const int kTotalFramesToUseForLCDTextMetrics = 50; | 460 static const int kTotalFramesToUseForLCDTextMetrics = 50; |
454 int total_frames_used_for_lcd_text_metrics_; | 461 int total_frames_used_for_lcd_text_metrics_; |
455 | 462 |
456 struct LCDTextMetrics { | 463 struct LCDTextMetrics { |
457 LCDTextMetrics() | 464 LCDTextMetrics() |
458 : total_num_cc_layers(0), | 465 : total_num_cc_layers(0), |
459 total_num_cc_layers_can_use_lcd_text(0), | 466 total_num_cc_layers_can_use_lcd_text(0), |
460 total_num_cc_layers_will_use_lcd_text(0) {} | 467 total_num_cc_layers_will_use_lcd_text(0) {} |
(...skipping 22 matching lines...) Expand all Loading... |
483 | 490 |
484 uint32_t surface_id_namespace_; | 491 uint32_t surface_id_namespace_; |
485 uint32_t next_surface_sequence_; | 492 uint32_t next_surface_sequence_; |
486 | 493 |
487 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 494 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
488 }; | 495 }; |
489 | 496 |
490 } // namespace cc | 497 } // namespace cc |
491 | 498 |
492 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 499 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |