Chromium Code Reviews| 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( |