| Index: chrome/browser/chrome_gpu_util.cc
|
| diff --git a/chrome/browser/chrome_gpu_util.cc b/chrome/browser/chrome_gpu_util.cc
|
| index cdf8e8190b262f1666a555be8d780d7844049b2a..f2a17c175a538bb39e708d4f22682ba41eb5a6a6 100644
|
| --- a/chrome/browser/chrome_gpu_util.cc
|
| +++ b/chrome/browser/chrome_gpu_util.cc
|
| @@ -134,6 +134,12 @@ bool ShouldRunCompositingFieldTrial() {
|
| #if !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
|
| return false;
|
| #endif
|
| +
|
| +// Necessary for linux_chromeos build since it defines both OS_LINUX
|
| +// and OS_CHROMEOS.
|
| +#if defined(OS_CHROMEOS)
|
| + return false;
|
| +#endif
|
|
|
| #if defined(OS_WIN)
|
| // Don't run the trial on Windows XP.
|
| @@ -141,15 +147,27 @@ bool ShouldRunCompositingFieldTrial() {
|
| return false;
|
| #endif
|
|
|
| + const GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance();
|
| + content::GpuFeatureType blacklisted_features =
|
| + gpu_data_manager->GetBlacklistedFeatures();
|
| +
|
| + // Don't run the field trial if gpu access has been blocked or
|
| + // accelerated compositing is blacklisted.
|
| + if (!gpu_data_manager->GpuAccessAllowed() ||
|
| + blacklisted_features & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)
|
| + return false;
|
| +
|
| // The performance of accelerated compositing is too low with software
|
| // rendering.
|
| - if (content::GpuDataManager::GetInstance()->ShouldUseSoftwareRendering())
|
| + if (gpu_data_manager->ShouldUseSoftwareRendering())
|
| return false;
|
|
|
| // Don't activate the field trial if force-compositing-mode has been
|
| // explicitly disabled from the command line.
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kDisableForceCompositingMode))
|
| + switches::kDisableForceCompositingMode) ||
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableAcceleratedCompositing))
|
| return false;
|
|
|
| return true;
|
|
|