Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 #if !defined(OS_ANDROID) |
| 187 // TODO(sohanjg): Revisit this memory usage in tile manager. | 187 // TODO(sohanjg): Revisit this memory usage in tile manager. |
|
enne (OOO)
2016/09/09 22:46:16
I'm not sure this TODO is adding much.
danakj
2016/09/09 22:55:43
yaa.. also the #if cuz this class is not used on a
| |
| 188 cc::ManagedMemoryPolicy policy( | 188 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; |
| 189 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, | 189 settings.gpu_memory_policy.priority_cutoff_when_visible = |
| 190 settings.memory_policy_.num_resources_limit); | 190 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
| 191 settings.memory_policy_ = policy; | |
| 192 #endif | 191 #endif |
| 193 | 192 |
| 194 base::TimeTicks before_create = base::TimeTicks::Now(); | 193 base::TimeTicks before_create = base::TimeTicks::Now(); |
| 195 | 194 |
| 196 cc::LayerTreeHost::InitParams params; | 195 cc::LayerTreeHost::InitParams params; |
| 197 params.client = this; | 196 params.client = this; |
| 198 params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager(); | 197 params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager(); |
| 199 params.gpu_memory_buffer_manager = | 198 params.gpu_memory_buffer_manager = |
| 200 context_factory_->GetGpuMemoryBufferManager(); | 199 context_factory_->GetGpuMemoryBufferManager(); |
| 201 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); | 200 params.task_graph_runner = context_factory_->GetTaskGraphRunner(); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 observer_list_, | 547 observer_list_, |
| 549 OnCompositingLockStateChanged(this)); | 548 OnCompositingLockStateChanged(this)); |
| 550 } | 549 } |
| 551 | 550 |
| 552 void Compositor::CancelCompositorLock() { | 551 void Compositor::CancelCompositorLock() { |
| 553 if (compositor_lock_) | 552 if (compositor_lock_) |
| 554 compositor_lock_->CancelLock(); | 553 compositor_lock_->CancelLock(); |
| 555 } | 554 } |
| 556 | 555 |
| 557 } // namespace ui | 556 } // namespace ui |
| OLD | NEW |