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

Unified Diff: ui/ozone/platform/dri/display_snapshot_dri.cc

Issue 642333002: [Ozone-DRI] Fix panel fitting lookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/platform/dri/display_snapshot_dri.cc
diff --git a/ui/ozone/platform/dri/display_snapshot_dri.cc b/ui/ozone/platform/dri/display_snapshot_dri.cc
index fa7b6f90e10aaf738e5af1179bde75eab575c3be..42e578b467117f6ef19f849c3d572975f2dfaad0 100644
--- a/ui/ozone/platform/dri/display_snapshot_dri.cc
+++ b/ui/ozone/platform/dri/display_snapshot_dri.cc
@@ -43,10 +43,15 @@ DisplayConnectionType GetDisplayType(drmModeConnector* connector) {
bool IsAspectPreserving(DriWrapper* drm, drmModeConnector* connector) {
ScopedDrmPropertyPtr property(drm->GetProperty(connector, "scaling mode"));
- if (property) {
+ if (!property)
+ return false;
+
+ for (int i = 0; i < connector->count_props; ++i) {
+ if (connector->props[i] != property->prop_id)
alexst (slow to review) 2014/10/10 15:00:08 I found my mind wondering looking at i and j here
dnicoara 2014/10/10 15:07:14 Done.
+ continue;
+
for (int j = 0; j < property->count_enums; ++j) {
- if (property->enums[j].value ==
- connector->prop_values[property->prop_id] &&
+ if (property->enums[j].value == connector->prop_values[i] &&
strcmp(property->enums[j].name, "Full aspect") == 0)
return true;
}
« 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