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

Side by Side Diff: ui/compositor/compositor.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 131 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
132 132
133 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); 133 settings.impl_side_painting = IsUIImplSidePaintingEnabled();
134 settings.use_zero_copy = IsUIZeroCopyEnabled(); 134 settings.use_zero_copy = IsUIZeroCopyEnabled();
135 settings.use_one_copy = IsUIOneCopyEnabled(); 135 settings.use_one_copy = IsUIOneCopyEnabled();
136 settings.use_image_texture_target = context_factory_->GetImageTextureTarget(); 136 settings.use_image_texture_target = context_factory_->GetImageTextureTarget();
137 137
138 base::TimeTicks before_create = base::TimeTicks::Now(); 138 base::TimeTicks before_create = base::TimeTicks::Now();
139 host_ = cc::LayerTreeHost::CreateSingleThreaded( 139 host_ = cc::LayerTreeHost::CreateSingleThreaded(
140 this, this, context_factory_->GetSharedBitmapManager(), 140 this, this, context_factory_->GetSharedBitmapManager(),
141 context_factory_->GetGpuMemoryBufferManager(), settings, task_runner_, 141 context_factory_->GetGpuMemoryBufferManager(), nullptr, settings,
142 nullptr); 142 task_runner_, nullptr);
143 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor", 143 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
144 base::TimeTicks::Now() - before_create); 144 base::TimeTicks::Now() - before_create);
145 host_->SetRootLayer(root_web_layer_); 145 host_->SetRootLayer(root_web_layer_);
146 host_->set_surface_id_namespace(surface_id_allocator_->id_namespace()); 146 host_->set_surface_id_namespace(surface_id_allocator_->id_namespace());
147 host_->SetLayerTreeHostClientReady(); 147 host_->SetLayerTreeHostClientReady();
148 } 148 }
149 149
150 Compositor::~Compositor() { 150 Compositor::~Compositor() {
151 TRACE_EVENT0("shutdown", "Compositor::destructor"); 151 TRACE_EVENT0("shutdown", "Compositor::destructor");
152 152
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 observer_list_, 377 observer_list_,
378 OnCompositingLockStateChanged(this)); 378 OnCompositingLockStateChanged(this));
379 } 379 }
380 380
381 void Compositor::CancelCompositorLock() { 381 void Compositor::CancelCompositorLock() {
382 if (compositor_lock_) 382 if (compositor_lock_)
383 compositor_lock_->CancelLock(); 383 compositor_lock_->CancelLock();
384 } 384 }
385 385
386 } // namespace ui 386 } // namespace ui
OLDNEW
« cc/trees/layer_tree_host_common.h ('K') | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698