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

Unified Diff: content/shell/app/shell_main_delegate.cc

Issue 2873203003: color: Add --force-color-profile command line flag (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/app/shell_main_delegate.cc
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc
index a723a39d2fa5ef9e1be18a01feb6d1be533ae362..eaa5e07d3551f9eb1fd01f467b8e39a93f3e251a 100644
--- a/content/shell/app/shell_main_delegate.cc
+++ b/content/shell/app/shell_main_delegate.cc
@@ -42,6 +42,7 @@
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display_switches.h"
+#include "ui/gfx/switches.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
@@ -212,8 +213,20 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
command_line.AppendSwitch(switches::kDisableGpuRasterization);
}
- // Unless/until WebM files are added to the media layout tests, we need to
- // avoid removing MP4/H264/AAC so that layout tests can run on Android.
+ // If the virtual test suite didn't specify a color space, then use the
+ // default layout test color space (GenericRGB for Mac and sRGB for all
+ // other platforms).
+ if (!command_line.HasSwitch(switches::kForceColorProfile)) {
+#if defined(OS_MACOSX)
+ command_line.AppendSwitchASCII(switches::kForceColorProfile,
+ "generic-rgb");
+#else
+ command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb");
+#endif
+ }
+
+// Unless/until WebM files are added to the media layout tests, we need to
+// avoid removing MP4/H264/AAC so that layout tests can run on Android.
#if !defined(OS_ANDROID)
media::RemoveProprietaryMediaTypesAndCodecsForTests();
#endif
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/shell/renderer/layout_test/layout_test_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698