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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 DCHECK_GT(settings.use_image_texture_targets.size(), format); | 168 DCHECK_GT(settings.use_image_texture_targets.size(), format); |
169 settings.use_image_texture_targets[format] = | 169 settings.use_image_texture_targets[format] = |
170 context_factory_->GetImageTextureTarget( | 170 context_factory_->GetImageTextureTarget( |
171 static_cast<gfx::BufferFormat>(format), usage); | 171 static_cast<gfx::BufferFormat>(format), usage); |
172 } | 172 } |
173 | 173 |
174 // Note: Only enable image decode tasks if we have more than one worker | 174 // Note: Only enable image decode tasks if we have more than one worker |
175 // thread. | 175 // thread. |
176 settings.image_decode_tasks_enabled = false; | 176 settings.image_decode_tasks_enabled = false; |
177 | 177 |
| 178 settings.use_output_surface_begin_frame_source = true; |
| 179 |
178 #if !defined(OS_ANDROID) | 180 #if !defined(OS_ANDROID) |
179 // TODO(sohanjg): Revisit this memory usage in tile manager. | 181 // TODO(sohanjg): Revisit this memory usage in tile manager. |
180 cc::ManagedMemoryPolicy policy( | 182 cc::ManagedMemoryPolicy policy( |
181 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, | 183 512 * 1024 * 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, |
182 settings.memory_policy_.num_resources_limit); | 184 settings.memory_policy_.num_resources_limit); |
183 settings.memory_policy_ = policy; | 185 settings.memory_policy_ = policy; |
184 #endif | 186 #endif |
185 | 187 |
186 base::TimeTicks before_create = base::TimeTicks::Now(); | 188 base::TimeTicks before_create = base::TimeTicks::Now(); |
187 | 189 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 observer_list_, | 528 observer_list_, |
527 OnCompositingLockStateChanged(this)); | 529 OnCompositingLockStateChanged(this)); |
528 } | 530 } |
529 | 531 |
530 void Compositor::CancelCompositorLock() { | 532 void Compositor::CancelCompositorLock() { |
531 if (compositor_lock_) | 533 if (compositor_lock_) |
532 compositor_lock_->CancelLock(); | 534 compositor_lock_->CancelLock(); |
533 } | 535 } |
534 | 536 |
535 } // namespace ui | 537 } // namespace ui |
OLD | NEW |