Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: mac build fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 public TopControlsManagerClient, 113 public TopControlsManagerClient,
114 public ScrollbarAnimationControllerClient, 114 public ScrollbarAnimationControllerClient,
115 public BeginFrameSourceMixIn, 115 public BeginFrameSourceMixIn,
116 public base::SupportsWeakPtr<LayerTreeHostImpl> { 116 public base::SupportsWeakPtr<LayerTreeHostImpl> {
117 public: 117 public:
118 static scoped_ptr<LayerTreeHostImpl> Create( 118 static scoped_ptr<LayerTreeHostImpl> Create(
119 const LayerTreeSettings& settings, 119 const LayerTreeSettings& settings,
120 LayerTreeHostImplClient* client, 120 LayerTreeHostImplClient* client,
121 Proxy* proxy, 121 Proxy* proxy,
122 RenderingStatsInstrumentation* rendering_stats_instrumentation, 122 RenderingStatsInstrumentation* rendering_stats_instrumentation,
123 SharedBitmapManager* manager, 123 SharedBitmapManager* shared_bitmap_manager,
124 GpuMemoryBufferManager* gpu_memory_buffer_manager,
124 int id); 125 int id);
125 virtual ~LayerTreeHostImpl(); 126 virtual ~LayerTreeHostImpl();
126 127
127 // BeginFrameSourceMixIn implementation 128 // BeginFrameSourceMixIn implementation
128 virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override; 129 virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
129 130
130 // InputHandler implementation 131 // InputHandler implementation
131 virtual void BindToClient(InputHandlerClient* client) override; 132 virtual void BindToClient(InputHandlerClient* client) override;
132 virtual InputHandler::ScrollStatus ScrollBegin( 133 virtual InputHandler::ScrollStatus ScrollBegin(
133 const gfx::Point& viewport_point, 134 const gfx::Point& viewport_point,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } 485 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; }
485 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } 486 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; }
486 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } 487 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; }
487 488
488 protected: 489 protected:
489 LayerTreeHostImpl( 490 LayerTreeHostImpl(
490 const LayerTreeSettings& settings, 491 const LayerTreeSettings& settings,
491 LayerTreeHostImplClient* client, 492 LayerTreeHostImplClient* client,
492 Proxy* proxy, 493 Proxy* proxy,
493 RenderingStatsInstrumentation* rendering_stats_instrumentation, 494 RenderingStatsInstrumentation* rendering_stats_instrumentation,
494 SharedBitmapManager* manager, 495 SharedBitmapManager* shared_bitmap_manager,
496 GpuMemoryBufferManager* gpu_memory_buffer_manager,
495 int id); 497 int id);
496 498
497 void UpdateInnerViewportContainerSize(); 499 void UpdateInnerViewportContainerSize();
498 500
499 // Virtual for testing. 501 // Virtual for testing.
500 virtual void AnimateLayers(base::TimeTicks monotonic_time); 502 virtual void AnimateLayers(base::TimeTicks monotonic_time);
501 503
502 // Virtual for testing. 504 // Virtual for testing.
503 virtual base::TimeDelta LowFrequencyAnimationInterval() const; 505 virtual base::TimeDelta LowFrequencyAnimationInterval() const;
504 506
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 695
694 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 696 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
695 MicroBenchmarkControllerImpl micro_benchmark_controller_; 697 MicroBenchmarkControllerImpl micro_benchmark_controller_;
696 698
697 bool need_to_update_visible_tiles_before_draw_; 699 bool need_to_update_visible_tiles_before_draw_;
698 700
699 // Optional callback to notify of new tree activations. 701 // Optional callback to notify of new tree activations.
700 base::Closure tree_activation_callback_; 702 base::Closure tree_activation_callback_;
701 703
702 SharedBitmapManager* shared_bitmap_manager_; 704 SharedBitmapManager* shared_bitmap_manager_;
705 GpuMemoryBufferManager* gpu_memory_buffer_manager_;
703 int id_; 706 int id_;
704 707
705 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 708 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
706 709
707 std::vector<PictureLayerImpl*> picture_layers_; 710 std::vector<PictureLayerImpl*> picture_layers_;
708 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 711 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
709 712
710 bool requires_high_res_to_draw_; 713 bool requires_high_res_to_draw_;
711 714
712 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 715 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
713 }; 716 };
714 717
715 } // namespace cc 718 } // namespace cc
716 719
717 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 720 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698