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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_set_visibility; | 76 bool using_set_visibility; |
77 bool using_egl_image; | 77 bool using_egl_image; |
78 bool allow_partial_texture_updates; | 78 bool allow_partial_texture_updates; |
79 bool using_offscreen_context3d; | 79 bool using_offscreen_context3d; |
80 int max_texture_size; | 80 int max_texture_size; |
81 bool avoid_pow2_textures; | 81 bool avoid_pow2_textures; |
82 bool using_map_image; | 82 bool using_map_image; |
| 83 bool using_shared_memory_resources; |
83 }; | 84 }; |
84 | 85 |
85 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { | 86 class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) { |
86 public: | 87 public: |
87 static scoped_ptr<LayerTreeHost> Create( | 88 static scoped_ptr<LayerTreeHost> Create( |
88 LayerTreeHostClient* client, | 89 LayerTreeHostClient* client, |
89 const LayerTreeSettings& settings, | 90 const LayerTreeSettings& settings, |
90 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 91 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
91 virtual ~LayerTreeHost(); | 92 virtual ~LayerTreeHost(); |
92 | 93 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 skia::RefPtr<SkPicture> CapturePicture(); | 250 skia::RefPtr<SkPicture> CapturePicture(); |
250 | 251 |
251 bool BlocksPendingCommit() const; | 252 bool BlocksPendingCommit() const; |
252 | 253 |
253 // Obtains a thorough dump of the LayerTreeHost as a value. | 254 // Obtains a thorough dump of the LayerTreeHost as a value. |
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 |
| 259 bool UsingSharedMemoryResources(); |
| 260 |
258 protected: | 261 protected: |
259 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 262 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
260 bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 263 bool Initialize(scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
261 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 264 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
262 | 265 |
263 private: | 266 private: |
264 bool InitializeProxy(scoped_ptr<Proxy> proxy); | 267 bool InitializeProxy(scoped_ptr<Proxy> proxy); |
265 | 268 |
266 void PaintLayerContents(const LayerList& render_surface_layer_list, | 269 void PaintLayerContents(const LayerList& render_surface_layer_list, |
267 ResourceUpdateQueue* queue, | 270 ResourceUpdateQueue* queue, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 int64 total_num_cc_layers_will_use_lcd_text; | 368 int64 total_num_cc_layers_will_use_lcd_text; |
366 }; | 369 }; |
367 LCDTextMetrics lcd_text_metrics_; | 370 LCDTextMetrics lcd_text_metrics_; |
368 | 371 |
369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 372 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
370 }; | 373 }; |
371 | 374 |
372 } // namespace cc | 375 } // namespace cc |
373 | 376 |
374 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 377 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |