OLD | NEW |
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 Loading... |
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 |
OLD | NEW |