summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 22:57:28 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 22:57:28 +0000
commit469b82d84ef7e3d9eb37eeb62546af240225f73e (patch)
treeac8d5631b6c540ac1f66c62416c8275c1035188a /chrome/browser/gpu
parent7ffee21c761211191b3064a480d009286bb7b2e8 (diff)
downloadchromium_src-469b82d84ef7e3d9eb37eeb62546af240225f73e.zip
chromium_src-469b82d84ef7e3d9eb37eeb62546af240225f73e.tar.gz
chromium_src-469b82d84ef7e3d9eb37eeb62546af240225f73e.tar.bz2
Delete memory manager dead code.
There have existed two paths in the memory manager for a few months -- the old path which uniformly distributes all memory across all visible renderers, and the new path which takes into account the needs of each renderer. The transition was made from the old policy to the new policy quite a while ago, so we can safely get rid of the old policy. BUG=150883 Review URL: https://chromiumcodereview.appspot.com/12475002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gpu')
-rw-r--r--chrome/browser/gpu/chrome_gpu_util.cc61
-rw-r--r--chrome/browser/gpu/chrome_gpu_util.h8
2 files changed, 0 insertions, 69 deletions
diff --git a/chrome/browser/gpu/chrome_gpu_util.cc b/chrome/browser/gpu/chrome_gpu_util.cc
index fccdc45..d6a0e90 100644
--- a/chrome/browser/gpu/chrome_gpu_util.cc
+++ b/chrome/browser/gpu/chrome_gpu_util.cc
@@ -24,67 +24,6 @@ using content::GpuDataManager;
namespace gpu_util {
-// The BrowserMonitor class is used to track the number of currently open
-// browser windows, so that the gpu can be notified when they are created or
-// destroyed. We only count tabbed windows for this purpose.
-
-// There's no BrowserList on Android/
-#if !defined(OS_ANDROID)
-class BrowserMonitor : public chrome::BrowserListObserver {
- public:
- static BrowserMonitor* GetInstance() {
- static BrowserMonitor* instance = NULL;
- if (!instance)
- instance = new BrowserMonitor;
- return instance;
- }
-
- void Install() {
- if (!installed_) {
- BrowserList::AddObserver(this);
- installed_ = true;
- }
- }
-
- void Uninstall() {
- if (installed_) {
- BrowserList::RemoveObserver(this);
- installed_ = false;
- }
- }
-
- private:
- BrowserMonitor() : num_browsers_(0), installed_(false) {
- }
-
- virtual ~BrowserMonitor() {
- }
-
- // BrowserListObserver implementation.
- virtual void OnBrowserAdded(Browser* browser) OVERRIDE {
- if (browser->type() == Browser::TYPE_TABBED)
- content::GpuDataManager::GetInstance()->SetWindowCount(++num_browsers_);
- }
-
- virtual void OnBrowserRemoved(Browser* browser) OVERRIDE {
- if (browser->type() == Browser::TYPE_TABBED)
- content::GpuDataManager::GetInstance()->SetWindowCount(--num_browsers_);
- }
-
- uint32 num_browsers_;
- bool installed_;
-};
-
-void InstallBrowserMonitor() {
- BrowserMonitor::GetInstance()->Install();
-}
-
-void UninstallBrowserMonitor() {
- BrowserMonitor::GetInstance()->Uninstall();
-}
-
-#endif // !defined(OS_ANDROID)
-
void DisableCompositingFieldTrial() {
base::FieldTrial* trial =
base::FieldTrialList::Find(content::kGpuCompositingFieldTrialName);
diff --git a/chrome/browser/gpu/chrome_gpu_util.h b/chrome/browser/gpu/chrome_gpu_util.h
index 4d14444..1edff61 100644
--- a/chrome/browser/gpu/chrome_gpu_util.h
+++ b/chrome/browser/gpu/chrome_gpu_util.h
@@ -7,14 +7,6 @@
namespace gpu_util {
-// Sets up a monitor for browser windows, to be used to determine gpu
-// managed memory allocation.
-// Not supported on Android.
-#if !defined(OS_ANDROID)
-void InstallBrowserMonitor();
-void UninstallBrowserMonitor();
-#endif // !defined(OS_ANDROID)
-
// Sets up force-compositing-mode and threaded compositing field trials.
void InitializeCompositingFieldTrial();