Index: content/browser/gpu/compositor_util.cc |
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc |
index 9606eb56756506d28b3b9df1bf77fabe5f3cd933..0b2460d45f094f843e1845a58eb21bc6fcaf09d5 100644 |
--- a/content/browser/gpu/compositor_util.cc |
+++ b/content/browser/gpu/compositor_util.cc |
@@ -310,12 +310,19 @@ bool IsThreadedGpuRasterizationEnabled() { |
bool UseSurfacesEnabled() { |
#if defined(OS_ANDROID) |
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 = |
*base::CommandLine::ForCurrentProcess(); |
- return command_line.HasSwitch(switches::kUseSurfaces); |
-#endif |
+ // Flags override. |
+ enabled |= command_line.HasSwitch(switches::kUseSurfaces); |
+ enabled &= !command_line.HasSwitch(switches::kDisableSurfaces); |
+ return enabled; |
} |
int GpuRasterizationMSAASampleCount() { |