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

Unified Diff: ui/display/display.cc

Issue 2814843007: Fix expected PlacementList sort order. (Closed)
Patch Set: Don't register invalid layouts Created 3 years, 8 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 | « ui/display/display.h ('k') | ui/display/display_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display.cc
diff --git a/ui/display/display.cc b/ui/display/display.cc
index ae0eb5118995c5a124651956c80f9ee9e52ef613..25573f8f9b90e3408ab9234162a0a9b0c92aae70 100644
--- a/ui/display/display.cc
+++ b/ui/display/display.cc
@@ -59,6 +59,17 @@ int64_t internal_display_id_ = -1;
} // namespace
+bool CompareDisplayIds(int64_t id1, int64_t id2) {
+ DCHECK_NE(id1, id2);
Nico 2017/07/28 21:09:58 This DCHECK is not correct. You're passing this to
+ // Output index is stored in the first 8 bits. See GetDisplayIdFromEDID
+ // in edid_parser.cc.
+ int index_1 = id1 & 0xFF;
+ int index_2 = id2 & 0xFF;
+ DCHECK_NE(index_1, index_2) << id1 << " and " << id2;
+ return Display::IsInternalDisplayId(id1) ||
+ (index_1 < index_2 && !Display::IsInternalDisplayId(id2));
+}
+
// static
float Display::GetForcedDeviceScaleFactor() {
if (g_forced_device_scale_factor < 0)
« no previous file with comments | « ui/display/display.h ('k') | ui/display/display_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698