Commit 37918d6d authored by oshima's avatar oshima Committed by Commit bot

Blacklist 4K@60kHz

BUG=chrome-os-partner:39397
R=marcheu@chromium.org

Review URL: https://codereview.chromium.org/1146793002

Cr-Commit-Position: refs/heads/master@{#330677}
parent 2fcc411c
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment