Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: ash/shell.cc

Issue 10909242: Add "panel_fitting" GPU feature type and use it for mirror mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed review comments of Patch Set 2 Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #if !defined(OS_MACOSX) 93 #if !defined(OS_MACOSX)
94 #include "ash/accelerators/accelerator_controller.h" 94 #include "ash/accelerators/accelerator_controller.h"
95 #include "ash/accelerators/accelerator_filter.h" 95 #include "ash/accelerators/accelerator_filter.h"
96 #include "ash/accelerators/nested_dispatcher_controller.h" 96 #include "ash/accelerators/nested_dispatcher_controller.h"
97 #endif 97 #endif
98 98
99 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
100 #include "ash/display/output_configurator_animation.h" 100 #include "ash/display/output_configurator_animation.h"
101 #include "base/message_pump_aurax11.h" 101 #include "base/message_pump_aurax11.h"
102 #include "chromeos/display/output_configurator.h" 102 #include "chromeos/display/output_configurator.h"
103 #include "content/public/browser/gpu_data_manager.h"
104 #include "content/public/common/gpu_feature_type.h"
103 #endif // defined(OS_CHROMEOS) 105 #endif // defined(OS_CHROMEOS)
104 106
105 namespace ash { 107 namespace ash {
106 108
107 namespace { 109 namespace {
108 110
109 using aura::Window; 111 using aura::Window;
110 using views::Widget; 112 using views::Widget;
111 113
112 // This dummy class is used for shell unit tests. We dont have chrome delegate 114 // This dummy class is used for shell unit tests. We dont have chrome delegate
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 output_configurator_animation_( 188 output_configurator_animation_(
187 new internal::OutputConfiguratorAnimation()), 189 new internal::OutputConfiguratorAnimation()),
188 #endif // defined(OS_CHROMEOS) 190 #endif // defined(OS_CHROMEOS)
189 shelf_(NULL), 191 shelf_(NULL),
190 panel_layout_manager_(NULL), 192 panel_layout_manager_(NULL),
191 status_area_widget_(NULL), 193 status_area_widget_(NULL),
192 browser_context_(NULL) { 194 browser_context_(NULL) {
193 gfx::Screen::SetInstance(screen_); 195 gfx::Screen::SetInstance(screen_);
194 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 196 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
195 #if defined(OS_CHROMEOS) 197 #if defined(OS_CHROMEOS)
198 content::GpuFeatureType blacklisted_features =
199 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
200 bool is_panel_fitting_disabled =
201 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
202 CommandLine::ForCurrentProcess()->HasSwitch(
203 switches::kAshDisablePanelFitting);
204 output_configurator_->Init(!is_panel_fitting_disabled);
205
196 output_configurator_->AddObserver(output_configurator_animation_.get()); 206 output_configurator_->AddObserver(output_configurator_animation_.get());
197 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 207 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
198 output_configurator()); 208 output_configurator());
199 static_cast<internal::MultiDisplayManager*>( 209 static_cast<internal::MultiDisplayManager*>(
200 aura::Env::GetInstance()->display_manager())->InitInternalDisplayInfo(); 210 aura::Env::GetInstance()->display_manager())->InitInternalDisplayInfo();
201 #endif // defined(OS_CHROMEOS) 211 #endif // defined(OS_CHROMEOS)
202 } 212 }
203 213
204 Shell::~Shell() { 214 Shell::~Shell() {
205 views::FocusManagerFactory::Install(NULL); 215 views::FocusManagerFactory::Install(NULL);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 766 }
757 767
758 void Shell::ShowCursor(bool visible) { 768 void Shell::ShowCursor(bool visible) {
759 RootWindowList root_windows = GetAllRootWindows(); 769 RootWindowList root_windows = GetAllRootWindows();
760 for (RootWindowList::iterator iter = root_windows.begin(); 770 for (RootWindowList::iterator iter = root_windows.begin();
761 iter != root_windows.end(); ++iter) 771 iter != root_windows.end(); ++iter)
762 (*iter)->ShowCursor(visible); 772 (*iter)->ShowCursor(visible);
763 } 773 }
764 774
765 } // namespace ash 775 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698