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 <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 virtual UIResourceId CreateUIResource(UIResourceClient* client); | 272 virtual UIResourceId CreateUIResource(UIResourceClient* client); |
273 // Deletes a UI resource. May safely be called more than once. | 273 // Deletes a UI resource. May safely be called more than once. |
274 virtual void DeleteUIResource(UIResourceId id); | 274 virtual void DeleteUIResource(UIResourceId id); |
275 // Put the recreation of all UI resources into the resource queue after they | 275 // Put the recreation of all UI resources into the resource queue after they |
276 // were evicted on the impl thread. | 276 // were evicted on the impl thread. |
277 void RecreateUIResources(); | 277 void RecreateUIResources(); |
278 | 278 |
279 virtual gfx::Size GetUIResourceSize(UIResourceId id) const; | 279 virtual gfx::Size GetUIResourceSize(UIResourceId id) const; |
280 | 280 |
281 bool UsingSharedMemoryResources(); | 281 bool UsingSharedMemoryResources(); |
282 int id() const { return tree_id_; } | 282 int id() const { return id_; } |
283 | 283 |
284 bool ScheduleMicroBenchmark(const std::string& benchmark_name, | 284 bool ScheduleMicroBenchmark(const std::string& benchmark_name, |
285 scoped_ptr<base::Value> value, | 285 scoped_ptr<base::Value> value, |
286 const MicroBenchmark::DoneCallback& callback); | 286 const MicroBenchmark::DoneCallback& callback); |
287 | 287 |
288 // Call this function when you expect there to be a swap buffer. | 288 // Call this function when you expect there to be a swap buffer. |
289 // See swap_promise.h for how to use SwapPromise. | 289 // See swap_promise.h for how to use SwapPromise. |
290 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); | 290 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); |
291 | 291 |
292 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); | 292 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 LCDTextMetrics() | 420 LCDTextMetrics() |
421 : total_num_cc_layers(0), | 421 : total_num_cc_layers(0), |
422 total_num_cc_layers_can_use_lcd_text(0), | 422 total_num_cc_layers_can_use_lcd_text(0), |
423 total_num_cc_layers_will_use_lcd_text(0) {} | 423 total_num_cc_layers_will_use_lcd_text(0) {} |
424 | 424 |
425 int64 total_num_cc_layers; | 425 int64 total_num_cc_layers; |
426 int64 total_num_cc_layers_can_use_lcd_text; | 426 int64 total_num_cc_layers_can_use_lcd_text; |
427 int64 total_num_cc_layers_will_use_lcd_text; | 427 int64 total_num_cc_layers_will_use_lcd_text; |
428 }; | 428 }; |
429 LCDTextMetrics lcd_text_metrics_; | 429 LCDTextMetrics lcd_text_metrics_; |
430 int tree_id_; | 430 int id_; |
431 bool next_commit_forces_redraw_; | 431 bool next_commit_forces_redraw_; |
432 | 432 |
433 scoped_refptr<Layer> page_scale_layer_; | 433 scoped_refptr<Layer> page_scale_layer_; |
434 scoped_refptr<Layer> inner_viewport_scroll_layer_; | 434 scoped_refptr<Layer> inner_viewport_scroll_layer_; |
435 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 435 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
436 | 436 |
437 SharedBitmapManager* shared_bitmap_manager_; | 437 SharedBitmapManager* shared_bitmap_manager_; |
438 | 438 |
439 ScopedPtrVector<SwapPromise> swap_promise_list_; | 439 ScopedPtrVector<SwapPromise> swap_promise_list_; |
440 | 440 |
441 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 441 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
442 }; | 442 }; |
443 | 443 |
444 } // namespace cc | 444 } // namespace cc |
445 | 445 |
446 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 446 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |