| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 void DidFailToInitializeOutputSurface(); | 128 void DidFailToInitializeOutputSurface(); |
| 129 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( | 129 virtual scoped_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( |
| 130 LayerTreeHostImplClient* client); | 130 LayerTreeHostImplClient* client); |
| 131 void DidLoseOutputSurface(); | 131 void DidLoseOutputSurface(); |
| 132 bool output_surface_lost() const { return output_surface_lost_; } | 132 bool output_surface_lost() const { return output_surface_lost_; } |
| 133 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } | 133 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } |
| 134 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } | 134 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } |
| 135 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); | 135 void DeleteContentsTexturesOnImplThread(ResourceProvider* resource_provider); |
| 136 bool UpdateLayers(ResourceUpdateQueue* queue); | 136 bool UpdateLayers(ResourceUpdateQueue* queue); |
| 137 | 137 |
| 138 // Called when the compositor completed page scale animation. |
| 139 void DidCompletePageScaleAnimation(); |
| 140 |
| 138 LayerTreeHostClient* client() { return client_; } | 141 LayerTreeHostClient* client() { return client_; } |
| 139 const base::WeakPtr<InputHandler>& GetInputHandler() { | 142 const base::WeakPtr<InputHandler>& GetInputHandler() { |
| 140 return input_handler_weak_ptr_; | 143 return input_handler_weak_ptr_; |
| 141 } | 144 } |
| 142 | 145 |
| 143 void NotifyInputThrottledUntilCommit(); | 146 void NotifyInputThrottledUntilCommit(); |
| 144 | 147 |
| 145 void Composite(base::TimeTicks frame_begin_time); | 148 void Composite(base::TimeTicks frame_begin_time); |
| 146 | 149 |
| 147 void FinishAllRendering(); | 150 void FinishAllRendering(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 float page_scale_factor() const { return page_scale_factor_; } | 228 float page_scale_factor() const { return page_scale_factor_; } |
| 226 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } | 229 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } |
| 227 | 230 |
| 228 SkColor background_color() const { return background_color_; } | 231 SkColor background_color() const { return background_color_; } |
| 229 void set_background_color(SkColor color) { background_color_ = color; } | 232 void set_background_color(SkColor color) { background_color_ = color; } |
| 230 | 233 |
| 231 void set_has_transparent_background(bool transparent) { | 234 void set_has_transparent_background(bool transparent) { |
| 232 has_transparent_background_ = transparent; | 235 has_transparent_background_ = transparent; |
| 233 } | 236 } |
| 234 | 237 |
| 235 void SetOverhangBitmap(const SkBitmap& bitmap); | |
| 236 | |
| 237 PrioritizedResourceManager* contents_texture_manager() const { | 238 PrioritizedResourceManager* contents_texture_manager() const { |
| 238 return contents_texture_manager_.get(); | 239 return contents_texture_manager_.get(); |
| 239 } | 240 } |
| 240 | 241 |
| 241 void SetVisible(bool visible); | 242 void SetVisible(bool visible); |
| 242 bool visible() const { return visible_; } | 243 bool visible() const { return visible_; } |
| 243 | 244 |
| 244 void SetThrottleFrameProduction(bool throttle); | 245 void SetThrottleFrameProduction(bool throttle); |
| 245 | 246 |
| 246 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 247 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 float min_page_scale_factor_; | 432 float min_page_scale_factor_; |
| 432 float max_page_scale_factor_; | 433 float max_page_scale_factor_; |
| 433 gfx::Vector2dF elastic_overscroll_; | 434 gfx::Vector2dF elastic_overscroll_; |
| 434 bool has_gpu_rasterization_trigger_; | 435 bool has_gpu_rasterization_trigger_; |
| 435 bool content_is_suitable_for_gpu_rasterization_; | 436 bool content_is_suitable_for_gpu_rasterization_; |
| 436 bool gpu_rasterization_histogram_recorded_; | 437 bool gpu_rasterization_histogram_recorded_; |
| 437 | 438 |
| 438 SkColor background_color_; | 439 SkColor background_color_; |
| 439 bool has_transparent_background_; | 440 bool has_transparent_background_; |
| 440 | 441 |
| 441 // If set, this texture is used to fill in the parts of the screen not | |
| 442 // covered by layers. | |
| 443 scoped_ptr<ScopedUIResource> overhang_ui_resource_; | |
| 444 | |
| 445 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 442 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
| 446 size_t partial_texture_update_requests_; | 443 size_t partial_texture_update_requests_; |
| 447 | 444 |
| 448 scoped_ptr<AnimationRegistrar> animation_registrar_; | 445 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 449 | 446 |
| 450 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 447 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 451 | 448 |
| 449 // If set, then page scale animation has completed, but the client hasn't been |
| 450 // notified about it yet. |
| 451 bool did_complete_scale_animation_; |
| 452 |
| 452 bool in_paint_layer_contents_; | 453 bool in_paint_layer_contents_; |
| 453 | 454 |
| 454 static const int kTotalFramesToUseForLCDTextMetrics = 50; | 455 static const int kTotalFramesToUseForLCDTextMetrics = 50; |
| 455 int total_frames_used_for_lcd_text_metrics_; | 456 int total_frames_used_for_lcd_text_metrics_; |
| 456 | 457 |
| 457 struct LCDTextMetrics { | 458 struct LCDTextMetrics { |
| 458 LCDTextMetrics() | 459 LCDTextMetrics() |
| 459 : total_num_cc_layers(0), | 460 : total_num_cc_layers(0), |
| 460 total_num_cc_layers_can_use_lcd_text(0), | 461 total_num_cc_layers_can_use_lcd_text(0), |
| 461 total_num_cc_layers_will_use_lcd_text(0) {} | 462 total_num_cc_layers_will_use_lcd_text(0) {} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 484 | 485 |
| 485 uint32_t surface_id_namespace_; | 486 uint32_t surface_id_namespace_; |
| 486 uint32_t next_surface_sequence_; | 487 uint32_t next_surface_sequence_; |
| 487 | 488 |
| 488 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 489 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 489 }; | 490 }; |
| 490 | 491 |
| 491 } // namespace cc | 492 } // namespace cc |
| 492 | 493 |
| 493 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 494 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |