| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 command_line.AppendSwitchASCII(switches::kHostResolverRules, | 206 command_line.AppendSwitchASCII(switches::kHostResolverRules, |
| 207 "MAP *.test 127.0.0.1"); | 207 "MAP *.test 127.0.0.1"); |
| 208 | 208 |
| 209 command_line.AppendSwitch(switches::kEnablePartialRaster); | 209 command_line.AppendSwitch(switches::kEnablePartialRaster); |
| 210 | 210 |
| 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 // Enable color correct rendering. If the virtual test suite didn't specify |
| 217 // default layout test color space (GenericRGB for Mac and sRGB for all | 217 // a color space, then use sRGB. |
| 218 // other platforms). | 218 command_line.AppendSwitch(switches::kEnableColorCorrectRendering); |
| 219 if (!command_line.HasSwitch(switches::kForceColorProfile)) { | 219 if (!command_line.HasSwitch(switches::kForceColorProfile)) |
| 220 #if defined(OS_MACOSX) | |
| 221 if (command_line.HasSwitch(switches::kEnableColorCorrectRendering)) { | |
| 222 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); | |
| 223 } else { | |
| 224 command_line.AppendSwitchASCII(switches::kForceColorProfile, | |
| 225 "generic-rgb"); | |
| 226 } | |
| 227 #else | |
| 228 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); | 220 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); |
| 229 #endif | |
| 230 } | |
| 231 | 221 |
| 232 // We want stable/baseline results when running layout tests. | 222 // We want stable/baseline results when running layout tests. |
| 233 command_line.AppendSwitch(switches::kDisableSkiaRuntimeOpts); | 223 command_line.AppendSwitch(switches::kDisableSkiaRuntimeOpts); |
| 234 | 224 |
| 235 command_line.AppendSwitch(cc::switches::kDisallowNonExactResourceReuse); | 225 command_line.AppendSwitch(cc::switches::kDisallowNonExactResourceReuse); |
| 236 | 226 |
| 237 // Unless/until WebM files are added to the media layout tests, we need to | 227 // Unless/until WebM files are added to the media layout tests, we need to |
| 238 // avoid removing MP4/H264/AAC so that layout tests can run on Android. | 228 // avoid removing MP4/H264/AAC so that layout tests can run on Android. |
| 239 #if !defined(OS_ANDROID) | 229 #if !defined(OS_ANDROID) |
| 240 media::RemoveProprietaryMediaTypesAndCodecsForTests(); | 230 media::RemoveProprietaryMediaTypesAndCodecsForTests(); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 381 |
| 392 return renderer_client_.get(); | 382 return renderer_client_.get(); |
| 393 } | 383 } |
| 394 | 384 |
| 395 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 385 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 396 utility_client_.reset(new ShellContentUtilityClient); | 386 utility_client_.reset(new ShellContentUtilityClient); |
| 397 return utility_client_.get(); | 387 return utility_client_.get(); |
| 398 } | 388 } |
| 399 | 389 |
| 400 } // namespace content | 390 } // namespace content |
| OLD | NEW |