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

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

Issue 2915673003: ui/gfx: Use separate components for color_space and switches (Closed)
Patch Set: Review feedback 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 | « ui/compositor/compositor.cc ('k') | ui/display/mac/screen_mac.mm » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_util.h" 5 #include "ui/compositor/compositor_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/base/switches.h" 8 #include "cc/base/switches.h"
9 #include "cc/output/renderer_settings.h" 9 #include "cc/output/renderer_settings.h"
10 #include "ui/compositor/compositor_switches.h" 10 #include "ui/compositor/compositor_switches.h"
11 #include "ui/display/display_switches.h" 11 #include "ui/display/display_switches.h"
12 #include "ui/gfx/switches.h" 12 #include "ui/gfx/color_space_switches.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 cc::RendererSettings CreateRendererSettings(uint32_t ( 16 cc::RendererSettings CreateRendererSettings(uint32_t (
17 *get_texture_target)(gfx::BufferFormat format, gfx::BufferUsage usage)) { 17 *get_texture_target)(gfx::BufferFormat format, gfx::BufferUsage usage)) {
18 cc::RendererSettings renderer_settings; 18 cc::RendererSettings renderer_settings;
19 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 19 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
20 renderer_settings.partial_swap_enabled = 20 renderer_settings.partial_swap_enabled =
21 !command_line->HasSwitch(switches::kUIDisablePartialSwap); 21 !command_line->HasSwitch(switches::kUIDisablePartialSwap);
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
(...skipping 23 matching lines...) Expand all
46 } 46 }
47 renderer_settings.disallow_non_exact_resource_reuse = 47 renderer_settings.disallow_non_exact_resource_reuse =
48 command_line->HasSwitch(cc::switches::kDisallowNonExactResourceReuse); 48 command_line->HasSwitch(cc::switches::kDisallowNonExactResourceReuse);
49 renderer_settings.allow_antialiasing = 49 renderer_settings.allow_antialiasing =
50 !command_line->HasSwitch(cc::switches::kDisableCompositedAntialiasing); 50 !command_line->HasSwitch(cc::switches::kDisableCompositedAntialiasing);
51 51
52 return renderer_settings; 52 return renderer_settings;
53 } 53 }
54 54
55 } // namespace ui 55 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/display/mac/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698