| 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 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 132       command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); | 132       command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects); | 
| 133 | 133 | 
| 134   settings.initial_debug_state.SetRecordRenderingStats( | 134   settings.initial_debug_state.SetRecordRenderingStats( | 
| 135       command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 135       command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 
| 136 | 136 | 
| 137   settings.use_display_lists = true; | 137   settings.use_display_lists = true; | 
| 138 | 138 | 
| 139   settings.use_zero_copy = IsUIZeroCopyEnabled(); | 139   settings.use_zero_copy = IsUIZeroCopyEnabled(); | 
| 140   settings.use_one_copy = IsUIOneCopyEnabled(); | 140   settings.use_one_copy = IsUIOneCopyEnabled(); | 
| 141 | 141 | 
|  | 142   settings.renderer_settings.use_rgba_4444_textures = | 
|  | 143       command_line->HasSwitch(switches::kUIEnableRGBA4444Textures); | 
|  | 144 | 
| 142   // Use PERSISTENT_MAP memory buffers to support partial tile raster for | 145   // Use PERSISTENT_MAP memory buffers to support partial tile raster for | 
| 143   // software raster into GpuMemoryBuffers. | 146   // software raster into GpuMemoryBuffers. | 
| 144   gfx::BufferUsage usage = gfx::BufferUsage::PERSISTENT_MAP; | 147   gfx::BufferUsage usage = gfx::BufferUsage::PERSISTENT_MAP; | 
| 145   settings.use_persistent_map_for_gpu_memory_buffers = true; | 148   settings.use_persistent_map_for_gpu_memory_buffers = true; | 
| 146 | 149 | 
| 147   for (size_t format = 0; | 150   for (size_t format = 0; | 
| 148       format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { | 151       format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { | 
| 149     DCHECK_GT(settings.use_image_texture_targets.size(), format); | 152     DCHECK_GT(settings.use_image_texture_targets.size(), format); | 
| 150     settings.use_image_texture_targets[format] = | 153     settings.use_image_texture_targets[format] = | 
| 151         context_factory_->GetImageTextureTarget( | 154         context_factory_->GetImageTextureTarget( | 
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 457                     observer_list_, | 460                     observer_list_, | 
| 458                     OnCompositingLockStateChanged(this)); | 461                     OnCompositingLockStateChanged(this)); | 
| 459 } | 462 } | 
| 460 | 463 | 
| 461 void Compositor::CancelCompositorLock() { | 464 void Compositor::CancelCompositorLock() { | 
| 462   if (compositor_lock_) | 465   if (compositor_lock_) | 
| 463     compositor_lock_->CancelLock(); | 466     compositor_lock_->CancelLock(); | 
| 464 } | 467 } | 
| 465 | 468 | 
| 466 }  // namespace ui | 469 }  // namespace ui | 
| OLD | NEW | 
|---|