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

Unified Diff: chrome/browser/lifetime/application_lifetime_win.cc

Issue 435383002: adds WARP support to Chromium, for Metro mode only, on Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: first round of tryfixes Created 6 years, 4 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
Index: chrome/browser/lifetime/application_lifetime_win.cc
diff --git a/chrome/browser/lifetime/application_lifetime_win.cc b/chrome/browser/lifetime/application_lifetime_win.cc
index 02c0019828455ebb2f53bbe4df4f8bf097913a0f..b15c15d9495ef32017b59edad33dd554ff153892 100644
--- a/chrome/browser/lifetime/application_lifetime_win.cc
+++ b/chrome/browser/lifetime/application_lifetime_win.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/first_run/upgrade_util.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/pref_names.h"
+#include "content/public/browser/gpu_data_manager.h"
#include "ui/views/widget/widget.h"
#if defined(USE_AURA)
@@ -97,7 +98,7 @@ void AttemptRestartToDesktopMode() {
PrefService* prefs = g_browser_process->local_state();
prefs->SetString(prefs::kRelaunchMode,
upgrade_util::kRelaunchModeDesktop);
-
+ content::GpuDataManager::GetInstance()->SetShouldUseWarp(false);
AttemptRestart();
}
@@ -105,6 +106,11 @@ void AttemptRestartToMetroMode() {
PrefService* prefs = g_browser_process->local_state();
prefs->SetString(prefs::kRelaunchMode,
upgrade_util::kRelaunchModeMetro);
+ // If we cannot use the GPU on this device we enable WARP software rendering
+ // for Metro mode, so we can use Metro mode which requires a Gpu.
+ if (!content::GpuDataManager::GetInstance()->GpuAccessAllowed(NULL)) {
sky 2014/08/20 22:37:03 nit: no {}
luken 2014/08/27 20:43:46 Deprecated code.
+ content::GpuDataManager::GetInstance()->SetShouldUseWarp(true);
+ }
AttemptRestart();
}

Powered by Google App Engine
This is Rietveld 408576698