summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2016-01-29 18:05:38 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-30 02:06:51 +0000
commit2638f3e513b497fe0f5bfa605fd8be97581577a7 (patch)
tree597d0e94bfb3c3cc472df5f28c81050851942ce8
parentbf5d50b8769bc50481fb8359df117149c5283bd9 (diff)
downloadchromium_src-2638f3e513b497fe0f5bfa605fd8be97581577a7.zip
chromium_src-2638f3e513b497fe0f5bfa605fd8be97581577a7.tar.gz
chromium_src-2638f3e513b497fe0f5bfa605fd8be97581577a7.tar.bz2
Remove kViewerConnect and GPU as WARP
I don't think we need WARP other than for Metro. TBR=jam R=sky, jbauman BUG=558054 Review URL: https://codereview.chromium.org/1649213002 Cr-Commit-Position: refs/heads/master@{#372511}
-rw-r--r--chrome/browser/first_run/upgrade_util_win.cc16
-rw-r--r--chrome/browser/ui/ash/ash_util.cc8
-rw-r--r--chrome/browser/ui/aura/active_desktop_monitor.cc68
-rw-r--r--chrome/browser/ui/aura/active_desktop_monitor.h42
-rw-r--r--chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc39
-rw-r--r--chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h4
-rw-r--r--chrome/browser/ui/window_sizer/window_sizer.cc18
-rw-r--r--chrome/chrome_browser_ui.gypi2
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.cc5
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.h1
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.cc44
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.h12
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private_unittest.cc16
-rw-r--r--content/browser/gpu/gpu_internals_ui.cc4
-rw-r--r--content/public/browser/gpu_data_manager.h4
-rw-r--r--ui/base/ui_base_switches.cc4
-rw-r--r--ui/base/ui_base_switches.h2
-rw-r--r--ui/gl/gl_surface_egl.cc8
-rw-r--r--ui/gl/gl_switches.cc1
-rw-r--r--ui/gl/gl_switches.h1
-rw-r--r--ui/gl/test/egl_initialization_displays_unittest.cc9
21 files changed, 6 insertions, 302 deletions
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index 204095b..8e5f8e2 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -106,22 +106,6 @@ RelaunchMode RelaunchModeStringToEnum(const std::string& relaunch_mode) {
if (relaunch_mode == kRelaunchModeDesktop)
return RELAUNCH_MODE_DESKTOP;
- // On Windows 7 if the current browser is in Chrome OS mode, then restart
- // into Chrome OS mode.
- if ((base::win::GetVersion() == base::win::VERSION_WIN7) &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kViewerConnect) &&
- !g_browser_process->local_state()->HasPrefPath(prefs::kRelaunchMode)) {
- // TODO(ananta)
- // On Windows 8, the delegate execute process looks up the previously
- // launched mode from the registry and relaunches into that mode. We need
- // something similar on Windows 7. For now, set the pref to ensure that
- // we get relaunched into Chrome OS mode.
- g_browser_process->local_state()->SetString(
- prefs::kRelaunchMode, upgrade_util::kRelaunchModeMetro);
- return RELAUNCH_MODE_METRO;
- }
-
return RELAUNCH_MODE_DEFAULT;
}
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc
index 04f3980..23622fe 100644
--- a/chrome/browser/ui/ash/ash_util.cc
+++ b/chrome/browser/ui/ash/ash_util.cc
@@ -11,19 +11,13 @@
#include "chrome/browser/ui/host_desktop.h"
#include "ui/aura/window_event_dispatcher.h"
-#if !defined(OS_CHROMEOS)
-#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
-#endif
-
namespace chrome {
bool ShouldOpenAshOnStartup() {
#if defined(OS_CHROMEOS)
return true;
#else
- // TODO(scottmg): http://crbug.com/133312, will need this for Win8 too.
- return base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh);
+ return false;
#endif
}
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.cc b/chrome/browser/ui/aura/active_desktop_monitor.cc
deleted file mode 100644
index 66937ff..0000000
--- a/chrome/browser/ui/aura/active_desktop_monitor.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/aura/active_desktop_monitor.h"
-
-#include "build/build_config.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window_tree_host.h"
-
-#if defined(USE_X11)
-#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
-#elif defined(OS_WIN)
-#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
-#endif
-
-// static
-ActiveDesktopMonitor* ActiveDesktopMonitor::g_instance_ = NULL;
-
-ActiveDesktopMonitor::ActiveDesktopMonitor(
- chrome::HostDesktopType initial_desktop)
- : last_activated_desktop_(initial_desktop) {
- DCHECK(!g_instance_);
- g_instance_ = this;
- aura::Env::GetInstance()->AddObserver(this);
-}
-
-ActiveDesktopMonitor::~ActiveDesktopMonitor() {
- DCHECK_EQ(g_instance_, this);
- aura::Env::GetInstance()->RemoveObserver(this);
- g_instance_ = NULL;
-}
-
-// static
-chrome::HostDesktopType ActiveDesktopMonitor::GetLastActivatedDesktopType() {
- // Tests may not have created the monitor.
- return g_instance_ ? g_instance_->last_activated_desktop_ :
- chrome::HOST_DESKTOP_TYPE_NATIVE;
-}
-
-// static
-bool ActiveDesktopMonitor::IsDesktopWindow(aura::WindowTreeHost* host) {
- // Only windows hosted by a DesktopWindowTreeHost implementation can be mapped
- // back to a content Window. All others, therefore, must be the root window
- // for an Ash display.
-#if defined(OS_WIN)
- return views::DesktopWindowTreeHostWin::GetContentWindowForHWND(
- host->GetAcceleratedWidget()) != NULL;
-#elif defined(USE_X11)
- return views::DesktopWindowTreeHostX11::GetContentWindowForXID(
- host->GetAcceleratedWidget()) != NULL;
-#else
- NOTREACHED();
- return true;
-#endif
-}
-
-void ActiveDesktopMonitor::OnWindowInitialized(aura::Window* window) {}
-
-void ActiveDesktopMonitor::OnHostActivated(aura::WindowTreeHost* host) {
- if (IsDesktopWindow(host))
- last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_NATIVE;
- else
- last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_ASH;
- DVLOG(1) << __FUNCTION__
- << (last_activated_desktop_ == chrome::HOST_DESKTOP_TYPE_NATIVE ?
- " native" : " ash") << " desktop activated.";
-}
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.h b/chrome/browser/ui/aura/active_desktop_monitor.h
deleted file mode 100644
index 4a00e7b..0000000
--- a/chrome/browser/ui/aura/active_desktop_monitor.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_AURA_ACTIVE_DESKTOP_MONITOR_H_
-#define CHROME_BROWSER_UI_AURA_ACTIVE_DESKTOP_MONITOR_H_
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "chrome/browser/ui/host_desktop.h"
-#include "ui/aura/env_observer.h"
-
-// Tracks the most-recently activated host desktop type by observing
-// WindowTreeHost activations.
-class ActiveDesktopMonitor : public aura::EnvObserver {
- public:
- // Constructs an ActiveDesktopMonitor which initially uses |initial_desktop|
- // as the |last_activated_desktop_| until a root window is activated.
- explicit ActiveDesktopMonitor(chrome::HostDesktopType initial_desktop);
- ~ActiveDesktopMonitor() override;
-
- // Returns the host desktop type of the most-recently activated
- // WindowTreeHost. This desktop type may no longer exist (e.g., the Ash
- // desktop may have closed since being active, and no RWHs on the native
- // desktop have yet been activated).
- static chrome::HostDesktopType GetLastActivatedDesktopType();
-
- private:
- // Returns true if |host| is a DesktopWindowTreeHost.
- static bool IsDesktopWindow(aura::WindowTreeHost* host);
-
- // aura::EnvObserver methods.
- void OnWindowInitialized(aura::Window* window) override;
- void OnHostActivated(aura::WindowTreeHost* host) override;
-
- static ActiveDesktopMonitor* g_instance_;
- chrome::HostDesktopType last_activated_desktop_;
-
- DISALLOW_COPY_AND_ASSIGN(ActiveDesktopMonitor);
-};
-
-#endif // CHROME_BROWSER_UI_AURA_ACTIVE_DESKTOP_MONITOR_H_
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index 9c3b040..2c24937 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -8,7 +8,6 @@
#include "base/run_loop.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_browser_main.h"
-#include "chrome/browser/ui/aura/active_desktop_monitor.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/common/chrome_switches.h"
@@ -82,27 +81,6 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
}
#endif
-#if !defined(OS_CHROMEOS) && defined(USE_ASH)
-// Returns the desktop this process was initially launched in.
-chrome::HostDesktopType GetInitialDesktop() {
-#if defined(OS_WIN) && defined(USE_ASH)
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kViewerConnect) ||
- command_line->HasSwitch(switches::kViewerLaunchViaAppId)) {
- return chrome::HOST_DESKTOP_TYPE_ASH;
- }
-#elif defined(OS_LINUX)
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kOpenAsh))
- return chrome::HOST_DESKTOP_TYPE_ASH;
-#endif
-
- return chrome::HOST_DESKTOP_TYPE_NATIVE;
-}
-#endif // !defined(OS_CHROMEOS) && defined(USE_ASH)
-
} // namespace
ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() {
@@ -113,12 +91,6 @@ ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() {
void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() {
#if defined(USE_X11) && !defined(OS_CHROMEOS)
-#if defined(USE_ASH)
- if (GetInitialDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
- ui::InitializeInputMethodForTesting();
- return;
- }
-#endif
// TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
views::LinuxUI* gtk2_ui = BuildGtk2UI();
gtk2_ui->SetNativeThemeOverride(base::Bind(&GetNativeThemeForWindow));
@@ -127,16 +99,7 @@ void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() {
}
void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() {
-#if !defined(OS_CHROMEOS) && defined(USE_ASH)
- CHECK(aura::Env::GetInstance());
- active_desktop_monitor_.reset(new ActiveDesktopMonitor(GetInitialDesktop()));
-#endif
-
#if defined(USE_X11) && !defined(OS_CHROMEOS)
-#if defined(USE_ASH)
- if (GetInitialDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
- return;
-#endif
views::LinuxUI::instance()->Initialize();
#endif
}
@@ -168,8 +131,6 @@ void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
}
void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
- active_desktop_monitor_.reset();
-
// aura::Env instance is deleted in BrowserProcessImpl::StartTearDown
// after the metrics service is deleted.
}
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
index 7ad66a4..9162381 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
@@ -11,8 +11,6 @@
#include "build/build_config.h"
#include "chrome/browser/chrome_browser_main_extra_parts.h"
-class ActiveDesktopMonitor;
-
class ChromeBrowserMainExtraPartsAura : public ChromeBrowserMainExtraParts {
public:
ChromeBrowserMainExtraPartsAura();
@@ -32,8 +30,6 @@ class ChromeBrowserMainExtraPartsAura : public ChromeBrowserMainExtraParts {
void DetectRunningAsRoot();
#endif
- scoped_ptr<ActiveDesktopMonitor> active_desktop_monitor_;
-
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAura);
};
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc
index 8f00e02..e7b478d 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -154,24 +154,8 @@ class DefaultTargetDisplayProvider : public WindowSizer::TargetDisplayProvider {
gfx::Display GetTargetDisplay(const gfx::Screen* screen,
const gfx::Rect& bounds) const override {
#if defined(USE_ASH)
- bool force_ash = false;
- // On Windows check if the browser is launched to serve ASH. If yes then
- // we should get the display for the corresponding root window created for
- // ASH. This ensures that the display gets the correct workarea, etc.
- // If the ASH shell does not exist then the current behavior is to open
- // browser windows if any on the desktop. Preserve that for now.
- // TODO(ananta).
- // This effectively means that the running browser process is in a split
- // personality mode, part of it running in ASH and the other running in
- // desktop. This may cause apps and other widgets to not work correctly.
- // Revisit and address.
-#if defined(OS_WIN)
- force_ash = ash::Shell::HasInstance() &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kViewerConnect);
-#endif
// Use the target display on ash.
- if (chrome::ShouldOpenAshOnStartup() || force_ash) {
+ if (chrome::ShouldOpenAshOnStartup()) {
aura::Window* target = ash::Shell::GetTargetRootWindow();
return screen->GetDisplayNearestWindow(target);
}
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index c4338f7..e71a5da 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -678,8 +678,6 @@
],
# Aura but not ChromeOS.
'chrome_browser_ui_aura_non_chromeos': [
- 'browser/ui/aura/active_desktop_monitor.cc',
- 'browser/ui/aura/active_desktop_monitor.h',
'browser/ui/views/frame/desktop_browser_frame_aura.cc',
'browser/ui/views/frame/desktop_browser_frame_aura.h',
'browser/ui/views/message_center/message_center_frame_view.cc',
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 2fe3cae..19f6788 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -81,11 +81,6 @@ void GpuDataManagerImpl::RegisterSwiftShaderPath(
private_->RegisterSwiftShaderPath(path);
}
-bool GpuDataManagerImpl::ShouldUseWarp() const {
- base::AutoLock auto_lock(lock_);
- return private_->ShouldUseWarp();
-}
-
void GpuDataManagerImpl::AddObserver(
GpuDataManagerObserver* observer) {
base::AutoLock auto_lock(lock_);
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index c509e3a..2b484cc 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -74,7 +74,6 @@ class CONTENT_EXPORT GpuDataManagerImpl
void RequestVideoMemoryUsageStatsUpdate() const override;
bool ShouldUseSwiftShader() const override;
void RegisterSwiftShaderPath(const base::FilePath& path) override;
- bool ShouldUseWarp() const override;
// TODO(kbr): the threading model for the GpuDataManagerObservers is
// not well defined, and it's impossible for callers to correctly
// delete observers from anywhere except in one of the observer's
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index e596369..0a07e93 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -281,7 +281,7 @@ bool GpuDataManagerImplPrivate::IsFeatureBlacklisted(int feature) const {
return true;
}
#endif // OS_CHROMEOS
- if (use_swiftshader_ || ShouldUseWarp()) {
+ if (use_swiftshader_) {
// Skia's software rendering is probably more efficient than going through
// software emulation of the GPU, so use that.
if (feature == gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
@@ -297,7 +297,7 @@ bool GpuDataManagerImplPrivate::IsDriverBugWorkaroundActive(int feature) const {
}
size_t GpuDataManagerImplPrivate::GetBlacklistedFeatureCount() const {
- if (use_swiftshader_ || ShouldUseWarp())
+ if (use_swiftshader_)
return 1;
return blacklisted_features_.size();
}
@@ -321,7 +321,7 @@ void GpuDataManagerImplPrivate::GetGpuProcessHandles(
bool GpuDataManagerImplPrivate::GpuAccessAllowed(
std::string* reason) const {
- if (use_swiftshader_ || ShouldUseWarp())
+ if (use_swiftshader_)
return true;
if (!gpu_process_accessible_) {
@@ -420,13 +420,6 @@ void GpuDataManagerImplPrivate::RegisterSwiftShaderPath(
EnableSwiftShaderIfNecessary();
}
-bool GpuDataManagerImplPrivate::ShouldUseWarp() const {
- std::string angle_impl_flag =
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kUseANGLE);
- return use_warp_ || angle_impl_flag == gfx::kANGLEImplementationWARPName;
-}
-
void GpuDataManagerImplPrivate::AddObserver(GpuDataManagerObserver* observer) {
GpuDataManagerImpl::UnlockedSession session(owner_);
observer_list_->AddObserver(observer);
@@ -606,7 +599,7 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
void GpuDataManagerImplPrivate::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) {
// No further update of gpu_info if falling back to SwiftShader.
- if (use_swiftshader_ || ShouldUseWarp())
+ if (use_swiftshader_)
return;
bool was_info_available = IsCompleteGpuInfoAvailable();
@@ -713,11 +706,6 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
gpu_info_.driver_vendor);
command_line->AppendSwitchASCII(switches::kGpuDriverVersion,
gpu_info_.driver_version);
-
- if (ShouldUseWarp() && !command_line->HasSwitch(switches::kUseANGLE)) {
- command_line->AppendSwitchASCII(switches::kUseANGLE,
- gfx::kANGLEImplementationWARPName);
- }
}
void GpuDataManagerImplPrivate::AppendPluginCommandLine(
@@ -787,7 +775,6 @@ void GpuDataManagerImplPrivate::DisableHardwareAcceleration() {
for (int i = 0; i < gpu::NUMBER_OF_GPU_FEATURE_TYPES; ++i)
blacklisted_features_.insert(i);
- EnableWarpIfNecessary();
EnableSwiftShaderIfNecessary();
NotifyGpuInfoUpdate();
}
@@ -905,8 +892,6 @@ bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGpuCompositing))
return false;
- if (ShouldUseWarp())
- return true;
if (ShouldUseSwiftShader())
return false;
if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING))
@@ -981,7 +966,6 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(
: complete_gpu_info_already_requested_(false),
observer_list_(new GpuDataManagerObserverList),
use_swiftshader_(false),
- use_warp_(false),
card_blacklisted_(false),
update_histograms_(true),
window_count_(0),
@@ -1058,7 +1042,6 @@ void GpuDataManagerImplPrivate::UpdateBlacklistedFeatures(
blacklisted_features_.insert(gpu::GPU_FEATURE_TYPE_WEBGL);
}
- EnableWarpIfNecessary();
EnableSwiftShaderIfNecessary();
}
@@ -1090,9 +1073,6 @@ void GpuDataManagerImplPrivate::NotifyGpuInfoUpdate() {
}
void GpuDataManagerImplPrivate::EnableSwiftShaderIfNecessary() {
- if (ShouldUseWarp())
- return;
-
if (!GpuAccessAllowed(NULL) ||
blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_WEBGL)) {
if (!swiftshader_path_.empty() &&
@@ -1102,22 +1082,6 @@ void GpuDataManagerImplPrivate::EnableSwiftShaderIfNecessary() {
}
}
-void GpuDataManagerImplPrivate::EnableWarpIfNecessary() {
-#if defined(OS_WIN)
- if (use_warp_)
- return;
- // We should only use WARP if we are unable to use the regular GPU for
- // compositing, and if we in Metro mode.
- use_warp_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kViewerConnect) &&
- !CanUseGpuBrowserCompositor();
-#endif
-}
-
-void GpuDataManagerImplPrivate::ForceWarpModeForTesting() {
- use_warp_ = true;
-}
-
std::string GpuDataManagerImplPrivate::GetDomainFromURL(
const GURL& url) const {
// For the moment, we just use the host, or its IP address, as the
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index b083b60..8766b4d 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -49,7 +49,6 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
void RequestVideoMemoryUsageStatsUpdate() const;
bool ShouldUseSwiftShader() const;
void RegisterSwiftShaderPath(const base::FilePath& path);
- bool ShouldUseWarp() const;
void AddObserver(GpuDataManagerObserver* observer);
void RemoveObserver(GpuDataManagerObserver* observer);
void UnblockDomainFrom3DAPIs(const GURL& url);
@@ -139,8 +138,6 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
SwiftShaderRendering2);
FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
- WarpEnabledOverridesSwiftShader);
- FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
GpuInfoUpdate);
FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
NoGpuInfoUpdateWithSwiftShader);
@@ -215,13 +212,6 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
// Try to switch to SwiftShader rendering, if possible and necessary.
void EnableSwiftShaderIfNecessary();
- // Try to switch to WARP rendering if the GPU hardware is not supported or
- // absent, and if we are trying to run in Windows Metro mode.
- void EnableWarpIfNecessary();
-
- // Use only for testing, forces |use_warp_| to true.
- void ForceWarpModeForTesting();
-
// Helper to extract the domain from a given URL.
std::string GetDomainFromURL(const GURL& url) const;
@@ -252,8 +242,6 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool use_swiftshader_;
- bool use_warp_;
-
base::FilePath swiftshader_path_;
// Current card force-blacklisted due to GPU crashes, or disabled through
diff --git a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
index f186559..3213596 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
@@ -288,22 +288,6 @@ TEST_F(GpuDataManagerImplPrivateTest, SwiftShaderRendering2) {
gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
}
-TEST_F(GpuDataManagerImplPrivateTest, WarpEnabledOverridesSwiftShader) {
- // If WARP fallback is enabled on Windows 8 it should not allow SwiftShader
- // to be enabled.
-#if defined(OS_WIN)
- if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
- ScopedGpuDataManagerImplPrivate manager;
- manager->ForceWarpModeForTesting();
- const base::FilePath test_path(FILE_PATH_LITERAL("AnyPath"));
- manager->RegisterSwiftShaderPath(test_path);
- manager->DisableHardwareAcceleration();
- EXPECT_TRUE(manager->ShouldUseWarp());
- EXPECT_FALSE(manager->ShouldUseSwiftShader());
- }
-#endif
-}
-
TEST_F(GpuDataManagerImplPrivateTest, GpuInfoUpdate) {
ScopedGpuDataManagerImpl manager;
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index c32b27e..2773c4f 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -145,10 +145,6 @@ base::DictionaryValue* GpuInfoAsDictionaryValue() {
ui::win::IsAeroGlassEnabled() ? "Aero Glass" : "none";
basic_info->Append(
NewDescriptionValuePair("Desktop compositing", compositor));
- if (GpuDataManagerImpl::GetInstance()->ShouldUseWarp()) {
- basic_info->Append(NewDescriptionValuePair("Using WARP",
- new base::FundamentalValue(true)));
- }
std::vector<gfx::PhysicalDisplaySize> display_sizes =
gfx::GetPhysicalSizeForDisplays();
diff --git a/content/public/browser/gpu_data_manager.h b/content/public/browser/gpu_data_manager.h
index 4991a4e..9edf2bc 100644
--- a/content/public/browser/gpu_data_manager.h
+++ b/content/public/browser/gpu_data_manager.h
@@ -78,10 +78,6 @@ class GpuDataManager {
// Register a path to SwiftShader.
virtual void RegisterSwiftShaderPath(const base::FilePath& path) = 0;
- // Returns current state about WARP, which may be due to command-line
- // arguments or saved state.
- virtual bool ShouldUseWarp() const = 0;
-
// Registers/unregister |observer|.
virtual void AddObserver(GpuDataManagerObserver* observer) = 0;
virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0;
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc
index 0058015..7ec3c6b 100644
--- a/ui/base/ui_base_switches.cc
+++ b/ui/base/ui_base_switches.cc
@@ -82,8 +82,4 @@ const char kTopChromeMDMaterialHybrid[] = "material-hybrid";
const char kTopChromeMDNonMaterial[] = "non-material";
#endif // defined(ENABLE_TOPCHROME_MD)
-// On Windows only: requests that Chrome connect to the running Metro viewer
-// process.
-const char kViewerConnect[] = "connect-to-metro-viewer";
-
} // namespace switches
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index e0c5849..5c4f8a9 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -44,8 +44,6 @@ UI_BASE_EXPORT extern const char kTopChromeMDMaterialHybrid[];
UI_BASE_EXPORT extern const char kTopChromeMDNonMaterial[];
#endif // defined(ENABLE_TOPCHROME_MD)
-UI_BASE_EXPORT extern const char kViewerConnect[];
-
} // namespace switches
#endif // UI_BASE_UI_BASE_SWITCHES_H_
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 40c11d5..949256e 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -198,9 +198,6 @@ EGLDisplay GetDisplayFromType(DisplayType display_type,
case DEFAULT:
case SWIFT_SHADER:
return eglGetDisplay(native_display);
- case ANGLE_WARP:
- return GetPlatformANGLEDisplay(native_display,
- EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, true);
case ANGLE_D3D9:
return GetPlatformANGLEDisplay(native_display,
EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, false);
@@ -225,8 +222,6 @@ const char* DisplayTypeString(DisplayType display_type) {
return "Default";
case SWIFT_SHADER:
return "SwiftShader";
- case ANGLE_WARP:
- return "WARP";
case ANGLE_D3D9:
return "D3D9";
case ANGLE_D3D11:
@@ -435,9 +430,6 @@ void GetEGLInitDisplays(bool supports_angle_d3d,
if (requested_renderer == kANGLEImplementationD3D9Name) {
init_displays->push_back(ANGLE_D3D9);
}
- if (requested_renderer == kANGLEImplementationWARPName) {
- init_displays->push_back(ANGLE_WARP);
- }
}
}
diff --git a/ui/gl/gl_switches.cc b/ui/gl/gl_switches.cc
index 2fbde37..2411517 100644
--- a/ui/gl/gl_switches.cc
+++ b/ui/gl/gl_switches.cc
@@ -18,7 +18,6 @@ const char kGLImplementationMockName[] = "mock";
const char kANGLEImplementationDefaultName[] = "default";
const char kANGLEImplementationD3D9Name[] = "d3d9";
const char kANGLEImplementationD3D11Name[] = "d3d11";
-const char kANGLEImplementationWARPName[] = "warp";
const char kANGLEImplementationOpenGLName[] = "gl";
const char kANGLEImplementationOpenGLESName[] = "gles";
diff --git a/ui/gl/gl_switches.h b/ui/gl/gl_switches.h
index 8c51d06..8153006 100644
--- a/ui/gl/gl_switches.h
+++ b/ui/gl/gl_switches.h
@@ -23,7 +23,6 @@ extern const char kGLImplementationMockName[];
GL_EXPORT extern const char kANGLEImplementationDefaultName[];
GL_EXPORT extern const char kANGLEImplementationD3D9Name[];
GL_EXPORT extern const char kANGLEImplementationD3D11Name[];
-GL_EXPORT extern const char kANGLEImplementationWARPName[];
GL_EXPORT extern const char kANGLEImplementationOpenGLName[];
GL_EXPORT extern const char kANGLEImplementationOpenGLESName[];
diff --git a/ui/gl/test/egl_initialization_displays_unittest.cc b/ui/gl/test/egl_initialization_displays_unittest.cc
index beb7586..526a522 100644
--- a/ui/gl/test/egl_initialization_displays_unittest.cc
+++ b/ui/gl/test/egl_initialization_displays_unittest.cc
@@ -90,15 +90,6 @@ TEST(EGLInitializationDisplaysTest, NonDefaultRenderers) {
std::vector<gfx::DisplayType> displays;
- // WARP
- command_line->AppendSwitchASCII(switches::kUseANGLE,
- gfx::kANGLEImplementationWARPName);
- displays.clear();
- GetEGLInitDisplays(true, true, command_line.get(), &displays);
- EXPECT_NE(std::find(displays.begin(), displays.end(), gfx::ANGLE_WARP),
- displays.end());
- EXPECT_EQ(displays.size(), 1u);
-
// OpenGL
command_line->AppendSwitchASCII(switches::kUseANGLE,
gfx::kANGLEImplementationOpenGLName);