| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) | 157 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) |
| 158 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; | 158 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; |
| 159 | 159 |
| 160 settings.use_layer_lists = | 160 settings.use_layer_lists = |
| 161 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); | 161 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); |
| 162 | 162 |
| 163 settings.enable_color_correct_rendering = | 163 settings.enable_color_correct_rendering = |
| 164 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) || | 164 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) || |
| 165 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering); | 165 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering); |
| 166 settings.renderer_settings.enable_color_correct_rendering = |
| 167 settings.enable_color_correct_rendering; |
| 166 | 168 |
| 167 // UI compositor always uses partial raster if not using zero-copy. Zero copy | 169 // UI compositor always uses partial raster if not using zero-copy. Zero copy |
| 168 // doesn't currently support partial raster. | 170 // doesn't currently support partial raster. |
| 169 settings.use_partial_raster = !settings.use_zero_copy; | 171 settings.use_partial_raster = !settings.use_zero_copy; |
| 170 | 172 |
| 171 // Populate buffer_to_texture_target_map for all buffer usage/formats. | 173 // Populate buffer_to_texture_target_map for all buffer usage/formats. |
| 172 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | 174 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
| 173 ++usage_idx) { | 175 ++usage_idx) { |
| 174 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); | 176 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| 175 for (int format_idx = 0; | 177 for (int format_idx = 0; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 for (auto& observer : observer_list_) | 559 for (auto& observer : observer_list_) |
| 558 observer.OnCompositingLockStateChanged(this); | 560 observer.OnCompositingLockStateChanged(this); |
| 559 } | 561 } |
| 560 | 562 |
| 561 void Compositor::CancelCompositorLock() { | 563 void Compositor::CancelCompositorLock() { |
| 562 if (compositor_lock_) | 564 if (compositor_lock_) |
| 563 compositor_lock_->CancelLock(); | 565 compositor_lock_->CancelLock(); |
| 564 } | 566 } |
| 565 | 567 |
| 566 } // namespace ui | 568 } // namespace ui |
| OLD | NEW |