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

Unified Diff: ui/ozone/common/display_snapshot_proxy.cc

Issue 1146793002: Blacklist 4K@60kHz (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/common/display_snapshot_proxy.cc
diff --git a/ui/ozone/common/display_snapshot_proxy.cc b/ui/ozone/common/display_snapshot_proxy.cc
index 8e0efaf1d0491aad42bcbcddace2888c0c3a084a..4f6556c7c2b302c8311e9898910ddcc18f263ec8 100644
--- a/ui/ozone/common/display_snapshot_proxy.cc
+++ b/ui/ozone/common/display_snapshot_proxy.cc
@@ -16,6 +16,13 @@ bool SameModes(const DisplayMode_Params& lhs, const DisplayMode_Params& rhs) {
lhs.refresh_rate == rhs.refresh_rate;
}
+// Exclude 4K@60kHz becaseu this doesn't work in most devices/configuration now.
+// TODO(marcheu|oshima): Revisit this. crbug.com/39397
+bool IsModeBlackListed(const DisplayMode_Params& mode_params) {
+ return mode_params.size.width() >= 3840 && mode_params.size.width() >= 2160 &&
+ mode_params.refresh_rate >= 60.0f;
+}
+
} // namespace
DisplaySnapshotProxy::DisplaySnapshotProxy(const DisplaySnapshot_Params& params)
@@ -31,7 +38,10 @@ DisplaySnapshotProxy::DisplaySnapshotProxy(const DisplaySnapshot_Params& params)
NULL),
string_representation_(params.string_representation) {
for (size_t i = 0; i < params.modes.size(); ++i) {
- modes_.push_back(new DisplayModeProxy(params.modes[i]));
+ const DisplayMode_Params& mode_params = params.modes[i];
+ if (IsModeBlackListed(mode_params))
+ continue;
+ modes_.push_back(new DisplayModeProxy(mode_params));
if (params.has_current_mode &&
SameModes(params.modes[i], params.current_mode))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698