Commit eb367c0b authored by jbauman's avatar jbauman Committed by Commit bot

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

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/923833002

Cr-Commit-Position: refs/heads/master@{#317716}
parent 6d2b3324
...@@ -90,6 +90,7 @@ std::string DeriveCommandLine(const GURL& start_url, ...@@ -90,6 +90,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::kDisableThreadedGpuRasterization, ::switches::kDisableThreadedGpuRasterization,
::switches::kDisableThreadedScrolling, ::switches::kDisableThreadedScrolling,
......
...@@ -310,12 +310,19 @@ bool IsThreadedGpuRasterizationEnabled() { ...@@ -310,12 +310,19 @@ bool IsThreadedGpuRasterizationEnabled() {
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;
} }
int GpuRasterizationMSAASampleCount() { int GpuRasterizationMSAASampleCount() {
......
...@@ -844,6 +844,9 @@ const char kUseNormalPriorityForTileTaskWorkerThreads[] = ...@@ -844,6 +844,9 @@ const char kUseNormalPriorityForTileTaskWorkerThreads[] =
// 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";
// The contents of this flag are prepended to the utility process command line. // The contents of this flag are prepended to the utility process command line.
// Useful values might be "valgrind" or "xterm -e gdb --args". // Useful values might be "valgrind" or "xterm -e gdb --args".
const char kUtilityCmdPrefix[] = "utility-cmd-prefix"; const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
......
...@@ -231,6 +231,7 @@ extern const char kUseImageTextureTarget[]; ...@@ -231,6 +231,7 @@ extern const char kUseImageTextureTarget[];
CONTENT_EXPORT extern const char kUseMobileUserAgent[]; CONTENT_EXPORT extern const char kUseMobileUserAgent[];
CONTENT_EXPORT extern const char kUseNormalPriorityForTileTaskWorkerThreads[]; CONTENT_EXPORT extern const char kUseNormalPriorityForTileTaskWorkerThreads[];
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