Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: ui/compositor/compositor.cc

Issue 2328133002: Add cc::LayerTreeSettings for color correct rendering (Closed)
Patch Set: Move to LayerTreeSettings Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 151 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
152 152
153 settings.use_zero_copy = IsUIZeroCopyEnabled(); 153 settings.use_zero_copy = IsUIZeroCopyEnabled();
154 154
155 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) 155 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures))
156 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; 156 settings.renderer_settings.preferred_tile_format = cc::RGBA_4444;
157 157
158 settings.use_layer_lists = 158 settings.use_layer_lists =
159 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); 159 command_line->HasSwitch(cc::switches::kUIEnableLayerLists);
160 160
161 settings.enable_color_correct_rendering =
162 command_line->HasSwitch(cc::switches::kEnableColorCorrectRendering);
163
161 // UI compositor always uses partial raster if not using zero-copy. Zero copy 164 // UI compositor always uses partial raster if not using zero-copy. Zero copy
162 // doesn't currently support partial raster. 165 // doesn't currently support partial raster.
163 settings.use_partial_raster = !settings.use_zero_copy; 166 settings.use_partial_raster = !settings.use_zero_copy;
164 167
165 // Populate buffer_to_texture_target_map for all buffer usage/formats. 168 // Populate buffer_to_texture_target_map for all buffer usage/formats.
166 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); 169 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST);
167 ++usage_idx) { 170 ++usage_idx) {
168 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); 171 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
169 for (int format_idx = 0; 172 for (int format_idx = 0;
170 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); 173 format_idx <= static_cast<int>(gfx::BufferFormat::LAST);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 observer_list_, 547 observer_list_,
545 OnCompositingLockStateChanged(this)); 548 OnCompositingLockStateChanged(this));
546 } 549 }
547 550
548 void Compositor::CancelCompositorLock() { 551 void Compositor::CancelCompositorLock() {
549 if (compositor_lock_) 552 if (compositor_lock_)
550 compositor_lock_->CancelLock(); 553 compositor_lock_->CancelLock();
551 } 554 }
552 555
553 } // namespace ui 556 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698