diff options
Diffstat (limited to 'ash/shell.cc')
-rw-r--r-- | ash/shell.cc | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 6845d4a..be56615 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -27,7 +27,6 @@ #include "ash/drag_drop/drag_drop_controller.h" #include "ash/first_run/first_run_helper_impl.h" #include "ash/focus_cycler.h" -#include "ash/gpu_support.h" #include "ash/high_contrast/high_contrast_controller.h" #include "ash/host/root_window_host_factory.h" #include "ash/keyboard_uma_event_filter.h" @@ -126,6 +125,8 @@ #include "base/message_loop/message_pump_x11.h" #include "base/sys_info.h" #include "chromeos/display/output_configurator.h" +#include "content/public/browser/gpu_data_manager.h" +#include "gpu/config/gpu_feature_type.h" #endif // defined(USE_X11) #include "ash/sticky_keys/sticky_keys_controller.h" #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" @@ -160,23 +161,6 @@ class AshVisibilityController : public views::corewm::VisibilityController { DISALLOW_COPY_AND_ASSIGN(AshVisibilityController); }; -class DefaultGPUSupportImpl : public GPUSupport { - public: - DefaultGPUSupportImpl() {} - virtual ~DefaultGPUSupportImpl() {} - - private: - // Overridden from GPUSupport: - virtual bool IsPanelFittingDisabled() const OVERRIDE { - return false; - } - virtual void DisableGpuWatchdog() OVERRIDE {} - virtual void GetGpuProcessHandles( - const GetGpuProcessHandlesCallback& callback) const OVERRIDE {} - - DISALLOW_COPY_AND_ASSIGN(DefaultGPUSupportImpl); -}; - } // namespace // static @@ -561,10 +545,6 @@ void Shell::DoInitialWorkspaceAnimation() { DoInitialAnimation(); } -void Shell::SetGPUSupport(scoped_ptr<GPUSupport> gpu_support) { - gpu_support_ = gpu_support.Pass(); -} - //////////////////////////////////////////////////////////////////////////////// // Shell, private: @@ -582,8 +562,7 @@ Shell::Shell(ShellDelegate* delegate) cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>( native_cursor_manager_)), simulate_modal_window_open_for_testing_(false), - is_touch_hud_projection_enabled_(false), - gpu_support_(new DefaultGPUSupportImpl) { + is_touch_hud_projection_enabled_(false) { DCHECK(delegate_.get()); display_manager_.reset(new internal::DisplayManager); @@ -593,7 +572,11 @@ Shell::Shell(ShellDelegate* delegate) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); display_controller_.reset(new DisplayController); #if defined(OS_CHROMEOS) && defined(USE_X11) - output_configurator_->Init(!gpu_support_->IsPanelFittingDisabled()); + bool is_panel_fitting_disabled = + content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( + gpu::GPU_FEATURE_TYPE_PANEL_FITTING); + + output_configurator_->Init(!is_panel_fitting_disabled); user_metrics_recorder_.reset(new UserMetricsRecorder); base::MessagePumpX11::Current()->AddDispatcherForRootWindow( |