| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 struct ScrollAndScaleSet; | 66 struct ScrollAndScaleSet; |
| 67 | 67 |
| 68 // Provides information on an Impl's rendering capabilities back to the | 68 // Provides information on an Impl's rendering capabilities back to the |
| 69 // LayerTreeHost. | 69 // LayerTreeHost. |
| 70 struct CC_EXPORT RendererCapabilities { | 70 struct CC_EXPORT RendererCapabilities { |
| 71 RendererCapabilities(); | 71 RendererCapabilities(); |
| 72 ~RendererCapabilities(); | 72 ~RendererCapabilities(); |
| 73 | 73 |
| 74 unsigned best_texture_format; | 74 unsigned best_texture_format; |
| 75 bool using_partial_swap; | 75 bool using_partial_swap; |
| 76 bool using_accelerated_painting; | |
| 77 bool using_set_visibility; | 76 bool using_set_visibility; |
| 78 bool using_swap_complete_callback; | 77 bool using_swap_complete_callback; |
| 79 bool using_gpu_memory_manager; | 78 bool using_gpu_memory_manager; |
| 80 bool using_egl_image; | 79 bool using_egl_image; |
| 81 bool allow_partial_texture_updates; | 80 bool allow_partial_texture_updates; |
| 82 bool using_offscreen_context3d; | 81 bool using_offscreen_context3d; |
| 83 int max_texture_size; | 82 int max_texture_size; |
| 84 bool avoid_pow2_textures; | 83 bool avoid_pow2_textures; |
| 85 bool using_map_image; | 84 bool using_map_image; |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { | 87 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { |
| 89 public: | 88 public: |
| 90 static scoped_ptr<LayerTreeHost> Create(LayerTreeHostClient* client, | 89 static scoped_ptr<LayerTreeHost> Create(LayerTreeHostClient* client, |
| 91 const LayerTreeSettings& settings, | 90 const LayerTreeSettings& settings, |
| 92 scoped_ptr<Thread> impl_thread); | 91 scoped_ptr<Thread> impl_thread); |
| 93 virtual ~LayerTreeHost(); | 92 virtual ~LayerTreeHost(); |
| 94 | 93 |
| 95 void SetLayerTreeHostClientReady(); | 94 void SetLayerTreeHostClientReady(); |
| 96 | 95 |
| 97 // Returns true if any LayerTreeHost is alive. | 96 // Returns true if any LayerTreeHost is alive. |
| 98 static bool AnyLayerTreeHostInstanceExists(); | 97 static bool AnyLayerTreeHostInstanceExists(); |
| 99 | 98 |
| 100 void set_needs_filter_context() { needs_filter_context_ = true; } | 99 void set_needs_filter_context() { needs_filter_context_ = true; } |
| 101 bool needs_offscreen_context() const { | 100 bool needs_offscreen_context() const { |
| 102 return needs_filter_context_ || settings_.accelerate_painting; | 101 return needs_filter_context_; |
| 103 } | 102 } |
| 104 | 103 |
| 105 // LayerTreeHost interface to Proxy. | 104 // LayerTreeHost interface to Proxy. |
| 106 void WillBeginFrame() { client_->WillBeginFrame(); } | 105 void WillBeginFrame() { client_->WillBeginFrame(); } |
| 107 void DidBeginFrame(); | 106 void DidBeginFrame(); |
| 108 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); | 107 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); |
| 109 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); | 108 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); |
| 110 void DidStopFlinging(); | 109 void DidStopFlinging(); |
| 111 void Layout(); | 110 void Layout(); |
| 112 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); | 111 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 int64 total_num_cc_layers_will_use_lcd_text; | 363 int64 total_num_cc_layers_will_use_lcd_text; |
| 365 }; | 364 }; |
| 366 LCDTextMetrics lcd_text_metrics_; | 365 LCDTextMetrics lcd_text_metrics_; |
| 367 | 366 |
| 368 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 367 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 369 }; | 368 }; |
| 370 | 369 |
| 371 } // namespace cc | 370 } // namespace cc |
| 372 | 371 |
| 373 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 372 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |