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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 settings.use_zero_copy = IsUIZeroCopyEnabled(); | 159 settings.use_zero_copy = IsUIZeroCopyEnabled(); |
160 | 160 |
161 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) | 161 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) |
162 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; | 162 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; |
163 | 163 |
164 settings.use_layer_lists = | 164 settings.use_layer_lists = |
165 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); | 165 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); |
166 | 166 |
167 settings.enable_color_correct_rasterization = | 167 settings.enable_color_correct_rasterization = |
168 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering) || | 168 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering); |
169 command_line->HasSwitch(cc::switches::kEnableTrueColorRendering); | |
170 settings.renderer_settings.enable_color_correct_rendering = | 169 settings.renderer_settings.enable_color_correct_rendering = |
171 settings.enable_color_correct_rasterization || | 170 settings.enable_color_correct_rasterization || |
172 command_line->HasSwitch(switches::kEnableHDROutput); | 171 command_line->HasSwitch(switches::kEnableHDROutput); |
173 | 172 |
174 // UI compositor always uses partial raster if not using zero-copy. Zero copy | 173 // UI compositor always uses partial raster if not using zero-copy. Zero copy |
175 // doesn't currently support partial raster. | 174 // doesn't currently support partial raster. |
176 settings.use_partial_raster = !settings.use_zero_copy; | 175 settings.use_partial_raster = !settings.use_zero_copy; |
177 | 176 |
178 // Populate buffer_to_texture_target_map for all buffer usage/formats. | 177 // Populate buffer_to_texture_target_map for all buffer usage/formats. |
179 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | 178 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 for (auto& observer : observer_list_) | 576 for (auto& observer : observer_list_) |
578 observer.OnCompositingLockStateChanged(this); | 577 observer.OnCompositingLockStateChanged(this); |
579 } | 578 } |
580 | 579 |
581 void Compositor::CancelCompositorLock() { | 580 void Compositor::CancelCompositorLock() { |
582 if (compositor_lock_) | 581 if (compositor_lock_) |
583 compositor_lock_->CancelLock(); | 582 compositor_lock_->CancelLock(); |
584 } | 583 } |
585 | 584 |
586 } // namespace ui | 585 } // namespace ui |
OLD | NEW |