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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
| 11 #include <utility> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
14 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "cc/animation/animation_events.h" | 18 #include "cc/animation/animation_events.h" |
18 #include "cc/animation/animation_registrar.h" | 19 #include "cc/animation/animation_registrar.h" |
19 #include "cc/animation/scrollbar_animation_controller.h" | 20 #include "cc/animation/scrollbar_animation_controller.h" |
20 #include "cc/base/cc_export.h" | 21 #include "cc/base/cc_export.h" |
(...skipping 20 matching lines...) Expand all Loading... |
41 class CompletionEvent; | 42 class CompletionEvent; |
42 class CompositorFrameMetadata; | 43 class CompositorFrameMetadata; |
43 class DebugRectHistory; | 44 class DebugRectHistory; |
44 class FrameRateCounter; | 45 class FrameRateCounter; |
45 class LayerImpl; | 46 class LayerImpl; |
46 class LayerTreeHostImplTimeSourceAdapter; | 47 class LayerTreeHostImplTimeSourceAdapter; |
47 class LayerTreeImpl; | 48 class LayerTreeImpl; |
48 class MemoryHistory; | 49 class MemoryHistory; |
49 class PageScaleAnimation; | 50 class PageScaleAnimation; |
50 class PaintTimeCounter; | 51 class PaintTimeCounter; |
| 52 class PerformanceDrawTimingCounter; |
51 class PictureLayerImpl; | 53 class PictureLayerImpl; |
52 class RasterWorkerPool; | 54 class RasterWorkerPool; |
53 class RenderPassDrawQuad; | 55 class RenderPassDrawQuad; |
54 class RenderingStatsInstrumentation; | 56 class RenderingStatsInstrumentation; |
55 class ResourcePool; | 57 class ResourcePool; |
56 class ScrollbarLayerImplBase; | 58 class ScrollbarLayerImplBase; |
57 class TextureMailboxDeleter; | 59 class TextureMailboxDeleter; |
58 class TopControlsManager; | 60 class TopControlsManager; |
59 class UIResourceBitmap; | 61 class UIResourceBitmap; |
60 class UIResourceRequest; | 62 class UIResourceRequest; |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 return !animation_registrar_->active_animation_controllers().empty(); | 353 return !animation_registrar_->active_animation_controllers().empty(); |
352 } | 354 } |
353 | 355 |
354 void set_max_memory_needed_bytes(size_t bytes) { | 356 void set_max_memory_needed_bytes(size_t bytes) { |
355 max_memory_needed_bytes_ = bytes; | 357 max_memory_needed_bytes_ = bytes; |
356 } | 358 } |
357 | 359 |
358 FrameRateCounter* fps_counter() { | 360 FrameRateCounter* fps_counter() { |
359 return fps_counter_.get(); | 361 return fps_counter_.get(); |
360 } | 362 } |
| 363 PerformanceDrawTimingCounter* draw_counter() { |
| 364 return draw_counter_.get(); |
| 365 } |
361 PaintTimeCounter* paint_time_counter() { | 366 PaintTimeCounter* paint_time_counter() { |
362 return paint_time_counter_.get(); | 367 return paint_time_counter_.get(); |
363 } | 368 } |
364 MemoryHistory* memory_history() { | 369 MemoryHistory* memory_history() { |
365 return memory_history_.get(); | 370 return memory_history_.get(); |
366 } | 371 } |
367 DebugRectHistory* debug_rect_history() { | 372 DebugRectHistory* debug_rect_history() { |
368 return debug_rect_history_.get(); | 373 return debug_rect_history_.get(); |
369 } | 374 } |
370 ResourceProvider* resource_provider() { | 375 ResourceProvider* resource_provider() { |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 gfx::Point previous_pinch_anchor_; | 618 gfx::Point previous_pinch_anchor_; |
614 | 619 |
615 scoped_ptr<TopControlsManager> top_controls_manager_; | 620 scoped_ptr<TopControlsManager> top_controls_manager_; |
616 | 621 |
617 scoped_ptr<PageScaleAnimation> page_scale_animation_; | 622 scoped_ptr<PageScaleAnimation> page_scale_animation_; |
618 | 623 |
619 // This is used for ticking animations slowly when hidden. | 624 // This is used for ticking animations slowly when hidden. |
620 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_; | 625 scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_; |
621 | 626 |
622 scoped_ptr<FrameRateCounter> fps_counter_; | 627 scoped_ptr<FrameRateCounter> fps_counter_; |
| 628 scoped_ptr<PerformanceDrawTimingCounter> draw_counter_; |
623 scoped_ptr<PaintTimeCounter> paint_time_counter_; | 629 scoped_ptr<PaintTimeCounter> paint_time_counter_; |
624 scoped_ptr<MemoryHistory> memory_history_; | 630 scoped_ptr<MemoryHistory> memory_history_; |
625 scoped_ptr<DebugRectHistory> debug_rect_history_; | 631 scoped_ptr<DebugRectHistory> debug_rect_history_; |
626 | 632 |
| 633 std::vector <std::pair<int, int64_t> > uncommitted_draw_frame_ids_; |
| 634 |
627 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 635 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
628 | 636 |
629 // The maximum memory that would be used by the prioritized resource | 637 // The maximum memory that would be used by the prioritized resource |
630 // manager, if there were no limit on memory usage. | 638 // manager, if there were no limit on memory usage. |
631 size_t max_memory_needed_bytes_; | 639 size_t max_memory_needed_bytes_; |
632 | 640 |
633 bool zero_budget_; | 641 bool zero_budget_; |
634 | 642 |
635 // Viewport size passed in from the main thread, in physical pixels. This | 643 // Viewport size passed in from the main thread, in physical pixels. This |
636 // value is the default size for all concepts of physical viewport (draw | 644 // value is the default size for all concepts of physical viewport (draw |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 size_t transfer_buffer_memory_limit_; | 698 size_t transfer_buffer_memory_limit_; |
691 | 699 |
692 std::vector<PictureLayerImpl*> picture_layers_; | 700 std::vector<PictureLayerImpl*> picture_layers_; |
693 | 701 |
694 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 702 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
695 }; | 703 }; |
696 | 704 |
697 } // namespace cc | 705 } // namespace cc |
698 | 706 |
699 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 707 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |