| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 settings.use_zero_copy = IsUIZeroCopyEnabled(); | 148 settings.use_zero_copy = IsUIZeroCopyEnabled(); |
| 149 | 149 |
| 150 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) | 150 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) |
| 151 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; | 151 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; |
| 152 | 152 |
| 153 settings.use_layer_lists = | 153 settings.use_layer_lists = |
| 154 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); | 154 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); |
| 155 | 155 |
| 156 settings.enable_color_correct_rendering = | 156 settings.enable_color_correct_rendering = |
| 157 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering); | 157 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) || |
| 158 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering); |
| 158 | 159 |
| 159 // UI compositor always uses partial raster if not using zero-copy. Zero copy | 160 // UI compositor always uses partial raster if not using zero-copy. Zero copy |
| 160 // doesn't currently support partial raster. | 161 // doesn't currently support partial raster. |
| 161 settings.use_partial_raster = !settings.use_zero_copy; | 162 settings.use_partial_raster = !settings.use_zero_copy; |
| 162 | 163 |
| 163 // Populate buffer_to_texture_target_map for all buffer usage/formats. | 164 // Populate buffer_to_texture_target_map for all buffer usage/formats. |
| 164 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | 165 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
| 165 ++usage_idx) { | 166 ++usage_idx) { |
| 166 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); | 167 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| 167 for (int format_idx = 0; | 168 for (int format_idx = 0; |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 for (auto& observer : observer_list_) | 527 for (auto& observer : observer_list_) |
| 527 observer.OnCompositingLockStateChanged(this); | 528 observer.OnCompositingLockStateChanged(this); |
| 528 } | 529 } |
| 529 | 530 |
| 530 void Compositor::CancelCompositorLock() { | 531 void Compositor::CancelCompositorLock() { |
| 531 if (compositor_lock_) | 532 if (compositor_lock_) |
| 532 compositor_lock_->CancelLock(); | 533 compositor_lock_->CancelLock(); |
| 533 } | 534 } |
| 534 | 535 |
| 535 } // namespace ui | 536 } // namespace ui |
| OLD | NEW |