| 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 "content/shell/app/shell_main_delegate.h" | 5 #include "content/shell/app/shell_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (!command_line.HasSwitch(switches::kForceGpuRasterization) && | 211 if (!command_line.HasSwitch(switches::kForceGpuRasterization) && |
| 212 !command_line.HasSwitch(switches::kEnableGpuRasterization)) { | 212 !command_line.HasSwitch(switches::kEnableGpuRasterization)) { |
| 213 command_line.AppendSwitch(switches::kDisableGpuRasterization); | 213 command_line.AppendSwitch(switches::kDisableGpuRasterization); |
| 214 } | 214 } |
| 215 | 215 |
| 216 // If the virtual test suite didn't specify a color space, then use the | 216 // If the virtual test suite didn't specify a color space, then use the |
| 217 // default layout test color space (GenericRGB for Mac and sRGB for all | 217 // default layout test color space (GenericRGB for Mac and sRGB for all |
| 218 // other platforms). | 218 // other platforms). |
| 219 if (!command_line.HasSwitch(switches::kForceColorProfile)) { | 219 if (!command_line.HasSwitch(switches::kForceColorProfile)) { |
| 220 #if defined(OS_MACOSX) | 220 #if defined(OS_MACOSX) |
| 221 command_line.AppendSwitchASCII(switches::kForceColorProfile, | 221 if (command_line.HasSwitch(switches::kEnableColorCorrectRendering)) { |
| 222 "generic-rgb"); | 222 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); |
| 223 } else { |
| 224 command_line.AppendSwitchASCII(switches::kForceColorProfile, |
| 225 "generic-rgb"); |
| 226 } |
| 223 #else | 227 #else |
| 224 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); | 228 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); |
| 225 #endif | 229 #endif |
| 226 } | 230 } |
| 227 | 231 |
| 228 // We want stable/baseline results when running layout tests. | 232 // We want stable/baseline results when running layout tests. |
| 229 command_line.AppendSwitch(switches::kDisableSkiaRuntimeOpts); | 233 command_line.AppendSwitch(switches::kDisableSkiaRuntimeOpts); |
| 230 | 234 |
| 231 command_line.AppendSwitch(cc::switches::kDisallowNonExactResourceReuse); | 235 command_line.AppendSwitch(cc::switches::kDisallowNonExactResourceReuse); |
| 232 | 236 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 391 |
| 388 return renderer_client_.get(); | 392 return renderer_client_.get(); |
| 389 } | 393 } |
| 390 | 394 |
| 391 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 395 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 392 utility_client_.reset(new ShellContentUtilityClient); | 396 utility_client_.reset(new ShellContentUtilityClient); |
| 393 return utility_client_.get(); | 397 return utility_client_.get(); |
| 394 } | 398 } |
| 395 | 399 |
| 396 } // namespace content | 400 } // namespace content |
| OLD | NEW |