Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index dfce306fcc0c338419479107a6ff6e19e0f1febc..585d9ef733d62a361a78d08171c757ccf274d84f 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -94,6 +94,8 @@ |
#include "ash/display/output_configurator_animation.h" |
#include "base/message_pump_aurax11.h" |
#include "chromeos/display/output_configurator.h" |
+#include "content/public/browser/gpu_data_manager.h" |
+#include "content/public/common/gpu_feature_type.h" |
#endif // defined(OS_CHROMEOS) |
namespace ash { |
@@ -189,6 +191,14 @@ Shell::Shell(ShellDelegate* delegate) |
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
ui_controls::InstallUIControlsAura(internal::CreateUIControls()); |
#if defined(OS_CHROMEOS) |
+ content::GpuFeatureType blacklisted_features = |
+ content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
+ bool is_panel_fitting_disabled = |
+ (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || |
+ CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kAshDisablePanelFitting); |
+ output_configurator_->Init(!is_panel_fitting_disabled); |
+ |
output_configurator_->AddObserver(output_configurator_animation_.get()); |
base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( |
output_configurator()); |