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 bool PaintLayerContents(const LayerList& render_surface_layer_list, | 269 bool PaintLayerContents(const LayerList& render_surface_layer_list, |
267 ResourceUpdateQueue* quue); | 270 ResourceUpdateQueue* quue); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 int64 total_num_cc_layers_will_use_lcd_text; | 364 int64 total_num_cc_layers_will_use_lcd_text; |
362 }; | 365 }; |
363 LCDTextMetrics lcd_text_metrics_; | 366 LCDTextMetrics lcd_text_metrics_; |
364 | 367 |
365 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 368 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
366 }; | 369 }; |
367 | 370 |
368 } // namespace cc | 371 } // namespace cc |
369 | 372 |
370 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 373 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |