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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1014993002: [exp] cc: Introduce cc::CompositorMutator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 8a3e644bb1109fe7348501cde4fee91fd810f34e..931e97fce781184f468683d9aea7892139e8b689 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -55,6 +55,7 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
LayerTreeHostClient* client,
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ CompositorMutator* compositor_mutator,
const LayerTreeSettings& settings,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
@@ -62,7 +63,8 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
DCHECK(main_task_runner.get());
DCHECK(impl_task_runner.get());
scoped_ptr<LayerTreeHost> layer_tree_host(new LayerTreeHost(
- client, shared_bitmap_manager, gpu_memory_buffer_manager, settings));
+ client, shared_bitmap_manager, gpu_memory_buffer_manager,
+ compositor_mutator, settings));
layer_tree_host->InitializeThreaded(main_task_runner,
impl_task_runner,
external_begin_frame_source.Pass());
@@ -74,11 +76,13 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
LayerTreeHostSingleThreadClient* single_thread_client,
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ CompositorMutator* compositor_mutator,
const LayerTreeSettings& settings,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_ptr<BeginFrameSource> external_begin_frame_source) {
scoped_ptr<LayerTreeHost> layer_tree_host(new LayerTreeHost(
- client, shared_bitmap_manager, gpu_memory_buffer_manager, settings));
+ client, shared_bitmap_manager, gpu_memory_buffer_manager,
+ compositor_mutator, settings));
layer_tree_host->InitializeSingleThreaded(single_thread_client,
main_task_runner,
external_begin_frame_source.Pass());
@@ -89,6 +93,7 @@ LayerTreeHost::LayerTreeHost(
LayerTreeHostClient* client,
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ CompositorMutator* compositor_mutator,
const LayerTreeSettings& settings)
: micro_benchmark_controller_(this),
next_ui_resource_id_(1),
@@ -120,6 +125,7 @@ LayerTreeHost::LayerTreeHost(
next_commit_forces_redraw_(false),
shared_bitmap_manager_(shared_bitmap_manager),
gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
+ compositor_mutator_(compositor_mutator),
surface_id_namespace_(0u),
next_surface_sequence_(1u) {
if (settings_.accelerated_animation_enabled)
@@ -420,17 +426,14 @@ void LayerTreeHost::DidFailToInitializeOutputSurface() {
scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
LayerTreeHostImplClient* client) {
DCHECK(proxy_->IsImplThread());
- scoped_ptr<LayerTreeHostImpl> host_impl =
- LayerTreeHostImpl::Create(settings_,
- client,
- proxy_.get(),
- rendering_stats_instrumentation_.get(),
- shared_bitmap_manager_,
- gpu_memory_buffer_manager_,
- id_);
+ scoped_ptr<LayerTreeHostImpl> host_impl = LayerTreeHostImpl::Create(
+ settings_, client, proxy_.get(), rendering_stats_instrumentation_.get(),
+ shared_bitmap_manager_, gpu_memory_buffer_manager_, compositor_mutator_,
loyso (OOO) 2015/03/20 02:38:14 Do we want to make CompositorMutator object shared
+ id_);
host_impl->SetUseGpuRasterization(UseGpuRasterization());
shared_bitmap_manager_ = NULL;
gpu_memory_buffer_manager_ = NULL;
+ compositor_mutator_ = nullptr;
top_controls_manager_weak_ptr_ =
host_impl->top_controls_manager()->AsWeakPtr();
input_handler_weak_ptr_ = host_impl->AsWeakPtr();

Powered by Google App Engine
This is Rietveld 408576698