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

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

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 <set> 10 #include <set>
(...skipping 23 matching lines...) Expand all
34 #include "cc/output/output_surface.h" 34 #include "cc/output/output_surface.h"
35 #include "cc/resources/resource_format.h" 35 #include "cc/resources/resource_format.h"
36 #include "cc/resources/scoped_ui_resource.h" 36 #include "cc/resources/scoped_ui_resource.h"
37 #include "cc/trees/layer_tree_host_client.h" 37 #include "cc/trees/layer_tree_host_client.h"
38 #include "cc/trees/layer_tree_host_common.h" 38 #include "cc/trees/layer_tree_host_common.h"
39 #include "cc/trees/layer_tree_settings.h" 39 #include "cc/trees/layer_tree_settings.h"
40 #include "cc/trees/proxy.h" 40 #include "cc/trees/proxy.h"
41 #include "third_party/skia/include/core/SkColor.h" 41 #include "third_party/skia/include/core/SkColor.h"
42 #include "ui/gfx/geometry/rect.h" 42 #include "ui/gfx/geometry/rect.h"
43 43
44 namespace gpu {
45 class GpuMemoryBufferManager;
46 }
47
44 namespace cc { 48 namespace cc {
45 class AnimationRegistrar; 49 class AnimationRegistrar;
46 class GpuMemoryBufferManager;
47 class HeadsUpDisplayLayer; 50 class HeadsUpDisplayLayer;
48 class Layer; 51 class Layer;
49 class LayerTreeHostImpl; 52 class LayerTreeHostImpl;
50 class LayerTreeHostImplClient; 53 class LayerTreeHostImplClient;
51 class LayerTreeHostSingleThreadClient; 54 class LayerTreeHostSingleThreadClient;
52 class PrioritizedResource; 55 class PrioritizedResource;
53 class PrioritizedResourceManager; 56 class PrioritizedResourceManager;
54 class Region; 57 class Region;
55 class RenderingStatsInstrumentation; 58 class RenderingStatsInstrumentation;
56 class ResourceProvider; 59 class ResourceProvider;
(...skipping 21 matching lines...) Expand all
78 int max_texture_size; 81 int max_texture_size;
79 bool using_shared_memory_resources; 82 bool using_shared_memory_resources;
80 }; 83 };
81 84
82 class CC_EXPORT LayerTreeHost { 85 class CC_EXPORT LayerTreeHost {
83 public: 86 public:
84 // The SharedBitmapManager will be used on the compositor thread. 87 // The SharedBitmapManager will be used on the compositor thread.
85 static scoped_ptr<LayerTreeHost> CreateThreaded( 88 static scoped_ptr<LayerTreeHost> CreateThreaded(
86 LayerTreeHostClient* client, 89 LayerTreeHostClient* client,
87 SharedBitmapManager* shared_bitmap_manager, 90 SharedBitmapManager* shared_bitmap_manager,
88 GpuMemoryBufferManager* gpu_memory_buffer_manager, 91 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
89 const LayerTreeSettings& settings, 92 const LayerTreeSettings& settings,
90 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 93 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
91 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 94 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
92 95
93 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( 96 static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
94 LayerTreeHostClient* client, 97 LayerTreeHostClient* client,
95 LayerTreeHostSingleThreadClient* single_thread_client, 98 LayerTreeHostSingleThreadClient* single_thread_client,
96 SharedBitmapManager* shared_bitmap_manager, 99 SharedBitmapManager* shared_bitmap_manager,
97 GpuMemoryBufferManager* gpu_memory_buffer_manager, 100 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
98 const LayerTreeSettings& settings, 101 const LayerTreeSettings& settings,
99 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 102 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
100 virtual ~LayerTreeHost(); 103 virtual ~LayerTreeHost();
101 104
102 void SetLayerTreeHostClientReady(); 105 void SetLayerTreeHostClientReady();
103 106
104 // LayerTreeHost interface to Proxy. 107 // LayerTreeHost interface to Proxy.
105 void WillBeginMainFrame() { 108 void WillBeginMainFrame() {
106 client_->WillBeginMainFrame(source_frame_number_); 109 client_->WillBeginMainFrame(source_frame_number_);
107 } 110 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // See swap_promise.h for how to use SwapPromise. 303 // See swap_promise.h for how to use SwapPromise.
301 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 304 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
302 305
303 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 306 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
304 307
305 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 308 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
306 309
307 protected: 310 protected:
308 LayerTreeHost(LayerTreeHostClient* client, 311 LayerTreeHost(LayerTreeHostClient* client,
309 SharedBitmapManager* shared_bitmap_manager, 312 SharedBitmapManager* shared_bitmap_manager,
310 GpuMemoryBufferManager* gpu_memory_buffer_manager, 313 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
311 const LayerTreeSettings& settings); 314 const LayerTreeSettings& settings);
312 void InitializeThreaded( 315 void InitializeThreaded(
313 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 316 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
314 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 317 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
315 void InitializeSingleThreaded( 318 void InitializeSingleThreaded(
316 LayerTreeHostSingleThreadClient* single_thread_client, 319 LayerTreeHostSingleThreadClient* single_thread_client,
317 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 320 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
318 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); 321 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing);
319 void SetOutputSurfaceLostForTesting(bool is_lost) { 322 void SetOutputSurfaceLostForTesting(bool is_lost) {
320 output_surface_lost_ = is_lost; 323 output_surface_lost_ = is_lost;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 bool next_commit_forces_redraw_; 452 bool next_commit_forces_redraw_;
450 453
451 scoped_refptr<Layer> page_scale_layer_; 454 scoped_refptr<Layer> page_scale_layer_;
452 scoped_refptr<Layer> inner_viewport_scroll_layer_; 455 scoped_refptr<Layer> inner_viewport_scroll_layer_;
453 scoped_refptr<Layer> outer_viewport_scroll_layer_; 456 scoped_refptr<Layer> outer_viewport_scroll_layer_;
454 457
455 LayerSelectionBound selection_start_; 458 LayerSelectionBound selection_start_;
456 LayerSelectionBound selection_end_; 459 LayerSelectionBound selection_end_;
457 460
458 SharedBitmapManager* shared_bitmap_manager_; 461 SharedBitmapManager* shared_bitmap_manager_;
459 GpuMemoryBufferManager* gpu_memory_buffer_manager_; 462 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
460 463
461 ScopedPtrVector<SwapPromise> swap_promise_list_; 464 ScopedPtrVector<SwapPromise> swap_promise_list_;
462 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 465 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
463 466
464 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 467 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
465 }; 468 };
466 469
467 } // namespace cc 470 } // namespace cc
468 471
469 #endif // CC_TREES_LAYER_TREE_HOST_H_ 472 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698