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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 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 | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('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 (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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 settings.image_decode_tasks_enabled = false; 180 settings.image_decode_tasks_enabled = false;
181 181
182 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; 182 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024;
183 settings.gpu_memory_policy.priority_cutoff_when_visible = 183 settings.gpu_memory_policy.priority_cutoff_when_visible =
184 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; 184 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
185 185
186 base::TimeTicks before_create = base::TimeTicks::Now(); 186 base::TimeTicks before_create = base::TimeTicks::Now();
187 187
188 cc::LayerTreeHostInProcess::InitParams params; 188 cc::LayerTreeHostInProcess::InitParams params;
189 params.client = this; 189 params.client = this;
190 params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager();
191 params.gpu_memory_buffer_manager =
192 context_factory_->GetGpuMemoryBufferManager();
193 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); 190 params.task_graph_runner = context_factory_->GetTaskGraphRunner();
194 params.settings = &settings; 191 params.settings = &settings;
195 params.main_task_runner = task_runner_; 192 params.main_task_runner = task_runner_;
196 params.animation_host = cc::AnimationHost::CreateMainInstance(); 193 params.animation_host = cc::AnimationHost::CreateMainInstance();
197 host_ = cc::LayerTreeHostInProcess::CreateSingleThreaded(this, &params); 194 host_ = cc::LayerTreeHostInProcess::CreateSingleThreaded(this, &params);
198 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor", 195 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
199 base::TimeTicks::Now() - before_create); 196 base::TimeTicks::Now() - before_create);
200 197
201 animation_timeline_ = 198 animation_timeline_ =
202 cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId()); 199 cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId());
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 for (auto& observer : observer_list_) 527 for (auto& observer : observer_list_)
531 observer.OnCompositingLockStateChanged(this); 528 observer.OnCompositingLockStateChanged(this);
532 } 529 }
533 530
534 void Compositor::CancelCompositorLock() { 531 void Compositor::CancelCompositorLock() {
535 if (compositor_lock_) 532 if (compositor_lock_)
536 compositor_lock_->CancelLock(); 533 compositor_lock_->CancelLock();
537 } 534 }
538 535
539 } // namespace ui 536 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698