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

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

Issue 14947002: Updated OSX to blacklist multisampling when multiple monitors are connected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to more generic SettingsChangedObserver Created 7 years, 7 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
Index: content/browser/gpu/gpu_data_manager_impl.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 1ac0c173c13c6c67c79d3c52fd42ac25e2fe51f5..3d1083c886c92b7961dd808d4bafbec39a95ef1e 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -78,12 +78,25 @@ std::string IntSetToString(const std::set<int>& list) {
void DisplayReconfigCallback(CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void* gpu_data_manager) {
- if (flags & kCGDisplayAddFlag) {
- GpuDataManagerImpl* manager =
- reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager);
- DCHECK(manager);
- manager->HandleGpuSwitch();
+ if(flags == kCGDisplayBeginConfigurationFlag)
+ return; // This call contains no information about the display change
+
+ GpuDataManagerImpl* manager =
+ reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager);
+ DCHECK(manager);
+
+ uint32_t displayCount;
+ CGGetActiveDisplayList(0, NULL, &displayCount);
+
+ bool fireGpuSwitch = flags & kCGDisplayAddFlag;
+
+ if (displayCount != manager->display_count_) {
+ manager->display_count_ = displayCount;
+ fireGpuSwitch = true;
}
+
+ if (fireGpuSwitch)
+ manager->HandleGpuSwitch();
}
#endif // OS_MACOSX
@@ -130,6 +143,14 @@ bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const {
return false;
}
+#if defined(OS_MACOSX)
+ // Many Mac laptops have buggy behavior when rendering to fullscreen
+ // multisampled buffers on an external monitor.
+ if(display_count_ > 1 && feature == GPU_FEATURE_TYPE_MULTISAMPLING) {
+ return true;
Ken Russell (switch to Gerrit) 2013/05/06 21:59:04 I thought per our earlier discussion that this was
+ }
+#endif
+
return (blacklisted_features_.count(feature) == 1);
}
@@ -712,6 +733,7 @@ GpuDataManagerImpl::GpuDataManagerImpl()
}
#if defined(OS_MACOSX)
+ CGGetActiveDisplayList (0, NULL, &display_count_);
CGDisplayRegisterReconfigurationCallback(DisplayReconfigCallback, this);
#endif // OS_MACOSX
}
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698