| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 DCHECK_GT(settings.use_image_texture_targets.size(), format); | 162 DCHECK_GT(settings.use_image_texture_targets.size(), format); |
| 163 settings.use_image_texture_targets[format] = | 163 settings.use_image_texture_targets[format] = |
| 164 context_factory_->GetImageTextureTarget( | 164 context_factory_->GetImageTextureTarget( |
| 165 static_cast<gfx::BufferFormat>(format), usage); | 165 static_cast<gfx::BufferFormat>(format), usage); |
| 166 } | 166 } |
| 167 | 167 |
| 168 // Note: Only enable image decode tasks if we have more than one worker | 168 // Note: Only enable image decode tasks if we have more than one worker |
| 169 // thread. | 169 // thread. |
| 170 settings.image_decode_tasks_enabled = false; | 170 settings.image_decode_tasks_enabled = false; |
| 171 | 171 |
| 172 settings.use_compositor_animation_timelines = | 172 settings.use_compositor_animation_timelines = !command_line->HasSwitch( |
| 173 command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines); | 173 switches::kUIDisableCompositorAnimationTimelines); |
| 174 | 174 |
| 175 #if !defined(OS_ANDROID) | 175 #if !defined(OS_ANDROID) |
| 176 // TODO(sohanjg): Revisit this memory usage in tile manager. | 176 // TODO(sohanjg): Revisit this memory usage in tile manager. |
| 177 cc::ManagedMemoryPolicy policy( | 177 cc::ManagedMemoryPolicy policy( |
| 178 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, | 178 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, |
| 179 settings.memory_policy_.num_resources_limit); | 179 settings.memory_policy_.num_resources_limit); |
| 180 settings.memory_policy_ = policy; | 180 settings.memory_policy_ = policy; |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 base::TimeTicks before_create = base::TimeTicks::Now(); | 183 base::TimeTicks before_create = base::TimeTicks::Now(); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 observer_list_, | 519 observer_list_, |
| 520 OnCompositingLockStateChanged(this)); | 520 OnCompositingLockStateChanged(this)); |
| 521 } | 521 } |
| 522 | 522 |
| 523 void Compositor::CancelCompositorLock() { | 523 void Compositor::CancelCompositorLock() { |
| 524 if (compositor_lock_) | 524 if (compositor_lock_) |
| 525 compositor_lock_->CancelLock(); | 525 compositor_lock_->CancelLock(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace ui | 528 } // namespace ui |
| OLD | NEW |