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

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

Issue 2321883002: cc: Remove SetMemoryPolicy from OutputSurface and Display. (Closed)
Patch Set: nits Created 4 years, 3 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
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | no next file » | 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 cc::BufferToTextureTargetKey(usage, format), target)); 176 cc::BufferToTextureTargetKey(usage, format), target));
177 } 177 }
178 } 178 }
179 179
180 // Note: Only enable image decode tasks if we have more than one worker 180 // Note: Only enable image decode tasks if we have more than one worker
181 // thread. 181 // thread.
182 settings.image_decode_tasks_enabled = false; 182 settings.image_decode_tasks_enabled = false;
183 183
184 settings.use_output_surface_begin_frame_source = true; 184 settings.use_output_surface_begin_frame_source = true;
185 185
186 #if !defined(OS_ANDROID) 186 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024;
187 // TODO(sohanjg): Revisit this memory usage in tile manager. 187 settings.gpu_memory_policy.priority_cutoff_when_visible =
188 cc::ManagedMemoryPolicy policy( 188 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
189 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
190 settings.memory_policy_.num_resources_limit);
191 settings.memory_policy_ = policy;
192 #endif
193 189
194 base::TimeTicks before_create = base::TimeTicks::Now(); 190 base::TimeTicks before_create = base::TimeTicks::Now();
195 191
196 cc::LayerTreeHost::InitParams params; 192 cc::LayerTreeHost::InitParams params;
197 params.client = this; 193 params.client = this;
198 params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager(); 194 params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager();
199 params.gpu_memory_buffer_manager = 195 params.gpu_memory_buffer_manager =
200 context_factory_->GetGpuMemoryBufferManager(); 196 context_factory_->GetGpuMemoryBufferManager();
201 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); 197 params.task_graph_runner = context_factory_->GetTaskGraphRunner();
202 params.settings = &settings; 198 params.settings = &settings;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 observer_list_, 544 observer_list_,
549 OnCompositingLockStateChanged(this)); 545 OnCompositingLockStateChanged(this));
550 } 546 }
551 547
552 void Compositor::CancelCompositorLock() { 548 void Compositor::CancelCompositorLock() {
553 if (compositor_lock_) 549 if (compositor_lock_)
554 compositor_lock_->CancelLock(); 550 compositor_lock_->CancelLock();
555 } 551 }
556 552
557 } // namespace ui 553 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698