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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1854383002: Remove DisplayCount from GpuDataManagerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 0f5c572dc9b2dce5202adc405a88901239f50306..6e256d6e59fd5fce7064bec091f0329903645053 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -39,9 +39,6 @@
#include "ui/gl/gl_switches.h"
#include "ui/gl/gpu_switching_manager.h"
-#if defined(OS_MACOSX)
-#include <ApplicationServices/ApplicationServices.h>
-#endif // OS_MACOSX
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif // OS_WIN
@@ -214,40 +211,6 @@ std::string IntSetToString(const std::set<int>& list) {
return rt;
}
-#if defined(OS_MACOSX)
-void DisplayReconfigCallback(CGDirectDisplayID display,
- CGDisplayChangeSummaryFlags flags,
- void* gpu_data_manager) {
- if (flags == kCGDisplayBeginConfigurationFlag)
- return; // This call contains no information about the display change
-
- GpuDataManagerImpl* manager =
- reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager);
- DCHECK(manager);
-
- // Display change.
- bool display_changed = false;
- uint32_t displayCount;
- CGGetActiveDisplayList(0, NULL, &displayCount);
- if (displayCount != manager->GetDisplayCount()) {
- manager->SetDisplayCount(displayCount);
- display_changed = true;
- }
-
- // Gpu change.
- bool gpu_changed = false;
- if (flags & kCGDisplayAddFlag) {
- uint32_t vendor_id, device_id;
- if (gpu::CollectGpuID(&vendor_id, &device_id) == gpu::kCollectInfoSuccess) {
- gpu_changed = manager->UpdateActiveGpu(vendor_id, device_id);
- }
- }
-
- if (display_changed || gpu_changed)
- manager->HandleGpuSwitch();
danakj 2016/04/05 00:51:57 Uhh, maybe this is still needed.. oops.
danakj 2016/04/05 00:57:52 HandleGpuSwitch() calls GpuSwitchingManager::Notif
danakj 2016/04/05 01:00:15 Ok ya on MacOSX there are some more.. - ImageTran
-}
-#endif // OS_MACOSX
-
// Block all domains' use of 3D APIs for this many milliseconds if
// approaching a threshold where system stability might be compromised.
const int64_t kBlockAllDomainsMs = 10000;
@@ -304,14 +267,6 @@ size_t GpuDataManagerImplPrivate::GetBlacklistedFeatureCount() const {
return blacklisted_features_.size();
}
-void GpuDataManagerImplPrivate::SetDisplayCount(unsigned int display_count) {
- display_count_ = display_count;
-}
-
-unsigned int GpuDataManagerImplPrivate::GetDisplayCount() const {
- return display_count_;
-}
-
gpu::GPUInfo GpuDataManagerImplPrivate::GetGPUInfo() const {
return gpu_info_;
}
@@ -1000,7 +955,6 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(GpuDataManagerImpl* owner)
window_count_(0),
domain_blocking_enabled_(true),
owner_(owner),
- display_count_(0),
gpu_process_accessible_(true),
is_initialized_(false),
finalized_(false) {
@@ -1013,11 +967,6 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(GpuDataManagerImpl* owner)
if (command_line->HasSwitch(switches::kDisableGpu))
DisableHardwareAcceleration();
-#if defined(OS_MACOSX)
- CGGetActiveDisplayList (0, NULL, &display_count_);
- CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_);
-#endif // OS_MACOSX
-
// For testing only.
if (command_line->HasSwitch(switches::kDisableDomainBlockingFor3DAPIs)) {
domain_blocking_enabled_ = false;
@@ -1025,9 +974,6 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(GpuDataManagerImpl* owner)
}
GpuDataManagerImplPrivate::~GpuDataManagerImplPrivate() {
-#if defined(OS_MACOSX)
- CGDisplayRemoveReconfigurationCallback(DisplayReconfigCallback, owner_);
-#endif
}
void GpuDataManagerImplPrivate::InitializeImpl(
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698