diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 23:19:25 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 23:19:25 +0000 |
commit | d271ba13087b02f646e6ee94380b20c99700b9b7 (patch) | |
tree | 1281daa2a269afec3e1bea1506bdbf3fe2442920 /ash/shell.cc | |
parent | fd42d13f3d867284868b66fd89b2ea6fc0829c1f (diff) | |
download | chromium_src-d271ba13087b02f646e6ee94380b20c99700b9b7.zip chromium_src-d271ba13087b02f646e6ee94380b20c99700b9b7.tar.gz chromium_src-d271ba13087b02f646e6ee94380b20c99700b9b7.tar.bz2 |
Revert 245010 "Inject GPUDataManager support into ash to abstrac..."
> Inject GPUDataManager support into ash to abstract a content dependency.
>
> http://crbug.com/332504
>
> R=oshima@chromium.org
>
> Review URL: https://codereview.chromium.org/138223004
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/137893010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245018 0039d316-1c4b-4281-b951-d872f2087c98
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( |