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

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: displaycount: . 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..ca46b05a21a04e67b963a72d9175155f56b820aa 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -225,16 +225,6 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
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;
@@ -243,7 +233,7 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
}
}
- if (display_changed || gpu_changed)
+ if (gpu_changed)
manager->HandleGpuSwitch();
}
#endif // OS_MACOSX
@@ -304,14 +294,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 +982,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) {
@@ -1014,7 +995,6 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(GpuDataManagerImpl* owner)
DisableHardwareAcceleration();
#if defined(OS_MACOSX)
- CGGetActiveDisplayList (0, NULL, &display_count_);
CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, owner_);
#endif // OS_MACOSX
« 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