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

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

Issue 2945453002: color: Use base::Feature to control color correct rendering (Closed)
Patch Set: Add histogram enum Created 3 years, 6 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 | « tools/metrics/histograms/enums.xml ('k') | ui/compositor/compositor_util.cc » ('j') | 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 settings.initial_debug_state.SetRecordRenderingStats( 127 settings.initial_debug_state.SetRecordRenderingStats(
128 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 128 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
129 settings.enable_surface_synchronization = enable_surface_synchronization; 129 settings.enable_surface_synchronization = enable_surface_synchronization;
130 130
131 settings.use_zero_copy = IsUIZeroCopyEnabled(); 131 settings.use_zero_copy = IsUIZeroCopyEnabled();
132 132
133 settings.use_layer_lists = 133 settings.use_layer_lists =
134 command_line->HasSwitch(cc::switches::kUIEnableLayerLists); 134 command_line->HasSwitch(cc::switches::kUIEnableLayerLists);
135 135
136 settings.enable_color_correct_rasterization = 136 settings.enable_color_correct_rasterization =
137 command_line->HasSwitch(switches::kEnableColorCorrectRendering); 137 base::FeatureList::IsEnabled(features::kColorCorrectRendering);
138 138
139 // UI compositor always uses partial raster if not using zero-copy. Zero copy 139 // UI compositor always uses partial raster if not using zero-copy. Zero copy
140 // doesn't currently support partial raster. 140 // doesn't currently support partial raster.
141 settings.use_partial_raster = !settings.use_zero_copy; 141 settings.use_partial_raster = !settings.use_zero_copy;
142 142
143 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures)) 143 if (command_line->HasSwitch(switches::kUIEnableRGBA4444Textures))
144 settings.preferred_tile_format = cc::RGBA_4444; 144 settings.preferred_tile_format = cc::RGBA_4444;
145 settings.resource_settings = context_factory_->GetResourceSettings(); 145 settings.resource_settings = context_factory_->GetResourceSettings();
146 146
147 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024; 147 settings.gpu_memory_policy.bytes_limit_when_visible = 512 * 1024 * 1024;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 void Compositor::TimeoutLocks() { 569 void Compositor::TimeoutLocks() {
570 // Make a copy, we're going to cause |active_locks_| to become 570 // Make a copy, we're going to cause |active_locks_| to become
571 // empty. 571 // empty.
572 std::vector<CompositorLock*> locks = active_locks_; 572 std::vector<CompositorLock*> locks = active_locks_;
573 for (auto* lock : locks) 573 for (auto* lock : locks)
574 lock->TimeoutLock(); 574 lock->TimeoutLock();
575 DCHECK(active_locks_.empty()); 575 DCHECK(active_locks_.empty());
576 } 576 }
577 577
578 } // namespace ui 578 } // namespace ui
OLDNEW
« no previous file with comments | « tools/metrics/histograms/enums.xml ('k') | ui/compositor/compositor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698