summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/gpu/chrome_gpu_util.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/gpu/chrome_gpu_util.cc b/chrome/browser/gpu/chrome_gpu_util.cc
index d6a0e90..73cca3e 100644
--- a/chrome/browser/gpu/chrome_gpu_util.cc
+++ b/chrome/browser/gpu/chrome_gpu_util.cc
@@ -5,6 +5,9 @@
#include "chrome/browser/gpu/chrome_gpu_util.h"
#include "base/command_line.h"
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/version.h"
@@ -49,6 +52,20 @@ bool ShouldRunCompositingFieldTrial() {
return false;
#endif
+#if defined(OS_MACOSX)
+ // Browser and content shell tests hang on 10.7 when the Apple software
+ // renderer is used. These tests ignore the blacklist (which disables
+ // compositing both on 10.7 and when the Apple software renderer is used)
+ // by specifying the kSkipGpuDataLoading switch, so disable forced
+ // compositing here based on the switch and OS version.
+ // http://crbug.com/230931
+ if (base::mac::IsOSLion() &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSkipGpuDataLoading)) {
+ return false;
+ }
+#endif
+
// Don't activate the field trial if force-compositing-mode has been
// explicitly disabled from the command line.
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -96,7 +113,7 @@ void InitializeCompositingFieldTrial() {
// http://crbug.com/140866 for linux
#if defined(OS_WIN)
- // Enable threaded compositing on Windows.
+ // Enable threaded compositing on Windows.
threaded_compositing_probability = kDivisor;
#elif defined(OS_MACOSX)
chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();