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

Unified 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: Fix compilation on non-Chrome OS Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698