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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool using_egl_image; | 78 bool using_egl_image; |
79 bool allow_partial_texture_updates; | 79 bool allow_partial_texture_updates; |
80 bool using_offscreen_context3d; | 80 bool using_offscreen_context3d; |
81 int max_texture_size; | 81 int max_texture_size; |
82 bool avoid_pow2_textures; | 82 bool avoid_pow2_textures; |
83 bool using_map_image; | 83 bool using_map_image; |
84 }; | 84 }; |
85 | 85 |
86 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { | 86 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { |
87 public: | 87 public: |
88 static scoped_ptr<LayerTreeHost> Create(LayerTreeHostClient* client, | 88 static scoped_ptr<LayerTreeHost> Create( |
89 const LayerTreeSettings& settings, | 89 LayerTreeHostClient* client, |
90 scoped_ptr<Thread> impl_thread); | 90 const LayerTreeSettings& settings, |
| 91 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
91 virtual ~LayerTreeHost(); | 92 virtual ~LayerTreeHost(); |
92 | 93 |
93 void SetLayerTreeHostClientReady(); | 94 void SetLayerTreeHostClientReady(); |
94 | 95 |
95 // Returns true if any LayerTreeHost is alive. | 96 // Returns true if any LayerTreeHost is alive. |
96 static bool AnyLayerTreeHostInstanceExists(); | 97 static bool AnyLayerTreeHostInstanceExists(); |
97 | 98 |
98 void set_needs_filter_context() { needs_filter_context_ = true; } | 99 void set_needs_filter_context() { needs_filter_context_ = true; } |
99 bool needs_offscreen_context() const { | 100 bool needs_offscreen_context() const { |
100 return needs_filter_context_; | 101 return needs_filter_context_; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 scoped_ptr<base::Value> AsValue() const; | 255 scoped_ptr<base::Value> AsValue() const; |
255 | 256 |
256 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 257 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
257 | 258 |
258 void IncrementLCDTextMetrics( | 259 void IncrementLCDTextMetrics( |
259 bool update_total_num_cc_layers_can_use_lcd_text, | 260 bool update_total_num_cc_layers_can_use_lcd_text, |
260 bool update_total_num_cc_layers_will_use_lcd_text); | 261 bool update_total_num_cc_layers_will_use_lcd_text); |
261 | 262 |
262 protected: | 263 protected: |
263 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 264 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
264 bool Initialize(scoped_ptr<Thread> impl_thread); | 265 bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
265 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 266 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
266 | 267 |
267 private: | 268 private: |
268 bool InitializeProxy(scoped_ptr<Proxy> proxy); | 269 bool InitializeProxy(scoped_ptr<Proxy> proxy); |
269 | 270 |
270 bool PaintLayerContents(const LayerList& render_surface_layer_list, | 271 bool PaintLayerContents(const LayerList& render_surface_layer_list, |
271 ResourceUpdateQueue* quue); | 272 ResourceUpdateQueue* quue); |
272 bool PaintMasksForRenderSurface(Layer* render_surface_layer, | 273 bool PaintMasksForRenderSurface(Layer* render_surface_layer, |
273 ResourceUpdateQueue* queue, | 274 ResourceUpdateQueue* queue, |
274 RenderingStats* stats); | 275 RenderingStats* stats); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 int64 total_num_cc_layers_will_use_lcd_text; | 365 int64 total_num_cc_layers_will_use_lcd_text; |
365 }; | 366 }; |
366 LCDTextMetrics lcd_text_metrics_; | 367 LCDTextMetrics lcd_text_metrics_; |
367 | 368 |
368 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
369 }; | 370 }; |
370 | 371 |
371 } // namespace cc | 372 } // namespace cc |
372 | 373 |
373 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 374 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |