Commit 8a61bd41 authored by jbauman's avatar jbauman Committed by Commit bot

Use Surfaces on Windows, Linux, and Mac OS (second try)

Surfaces should be feature-complete, so try enabling them on Windows, Linux, and Mac OS. They're still disabled on Chrome OS because they rely on single-threaded browser compositing, and on Android because they haven't been implemented there yet.

BUG=334090
TBR=piman@chromium.org

Review URL: https://codereview.chromium.org/796693003

Cr-Commit-Position: refs/heads/master@{#308028}
parent 12076f74
...@@ -91,6 +91,7 @@ std::string DeriveCommandLine(const GURL& start_url, ...@@ -91,6 +91,7 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisablePanelFitting, ::switches::kDisablePanelFitting,
::switches::kDisableSeccompFilterSandbox, ::switches::kDisableSeccompFilterSandbox,
::switches::kDisableSetuidSandbox, ::switches::kDisableSetuidSandbox,
::switches::kDisableSurfaces,
::switches::kDisableTextBlobs, ::switches::kDisableTextBlobs,
::switches::kDisableThreadedScrolling, ::switches::kDisableThreadedScrolling,
::switches::kDisableTouchDragDrop, ::switches::kDisableTouchDragDrop,
......
...@@ -287,12 +287,19 @@ bool IsForceGpuRasterizationEnabled() { ...@@ -287,12 +287,19 @@ bool IsForceGpuRasterizationEnabled() {
bool UseSurfacesEnabled() { bool UseSurfacesEnabled() {
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
return false; return false;
#else #endif
bool enabled = false;
#if (defined(USE_AURA) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
enabled = true;
#endif
const base::CommandLine& command_line = const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess(); *base::CommandLine::ForCurrentProcess();
return command_line.HasSwitch(switches::kUseSurfaces); // Flags override.
#endif enabled |= command_line.HasSwitch(switches::kUseSurfaces);
enabled &= !command_line.HasSwitch(switches::kDisableSurfaces);
return enabled;
} }
base::DictionaryValue* GetFeatureStatus() { base::DictionaryValue* GetFeatureStatus() {
......
...@@ -833,6 +833,9 @@ const char kUseMobileUserAgent[] = "use-mobile-user-agent"; ...@@ -833,6 +833,9 @@ const char kUseMobileUserAgent[] = "use-mobile-user-agent";
// Use the new surfaces system to handle compositor delegation. // Use the new surfaces system to handle compositor delegation.
const char kUseSurfaces[] = "use-surfaces"; const char kUseSurfaces[] = "use-surfaces";
// Disable the use of the new surfaces system to handle compositor delegation.
const char kDisableSurfaces[] = "disable-surfaces";
// On POSIX only: the contents of this flag are prepended to the utility // On POSIX only: the contents of this flag are prepended to the utility
// process command line. Useful values might be "valgrind" or "xterm -e gdb // process command line. Useful values might be "valgrind" or "xterm -e gdb
// --args". // --args".
......
...@@ -232,6 +232,7 @@ CONTENT_EXPORT extern const char kEnableNativeGpuMemoryBuffers[]; ...@@ -232,6 +232,7 @@ CONTENT_EXPORT extern const char kEnableNativeGpuMemoryBuffers[];
extern const char kUseImageTextureTarget[]; extern const char kUseImageTextureTarget[];
CONTENT_EXPORT extern const char kUseMobileUserAgent[]; CONTENT_EXPORT extern const char kUseMobileUserAgent[];
extern const char kUseSurfaces[]; extern const char kUseSurfaces[];
CONTENT_EXPORT extern const char kDisableSurfaces[];
extern const char kUtilityCmdPrefix[]; extern const char kUtilityCmdPrefix[];
CONTENT_EXPORT extern const char kUtilityProcess[]; CONTENT_EXPORT extern const char kUtilityProcess[];
extern const char kUtilityProcessAllowedDir[]; extern const char kUtilityProcessAllowedDir[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment