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

Unified Diff: ui/display/util/x11/edid_parser_x11.cc

Issue 854203002: Read EDID for the 1st display for startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: ui/display/util/x11/edid_parser_x11.cc
diff --git a/ui/display/util/x11/edid_parser_x11.cc b/ui/display/util/x11/edid_parser_x11.cc
index 407639b650871e2683d226c0ed2143204c297023..47f8fb68b684dc2c358f706d4746dcce55fe899c 100644
--- a/ui/display/util/x11/edid_parser_x11.cc
+++ b/ui/display/util/x11/edid_parser_x11.cc
@@ -54,7 +54,7 @@ bool GetEDIDProperty(XID output, std::vector<uint8_t>* edid) {
int actual_format;
unsigned long bytes_after;
unsigned long nitems = 0;
- unsigned char* prop = NULL;
+ unsigned char* prop = nullptr;
XRRGetOutputProperty(display,
output,
edid_property,
@@ -78,7 +78,7 @@ bool GetEDIDProperty(XID output, std::vector<uint8_t>* edid) {
// Gets some useful data from the specified output device, such like
// manufacturer's ID, product code, and human readable name. Returns false if it
// fails to get those data and doesn't touch manufacturer ID/product code/name.
-// NULL can be passed for unwanted output parameters.
+// nullptr can be passed for unwanted output parameters.
bool GetOutputDeviceData(XID output,
uint16_t* manufacturer_id,
std::string* human_readable_name) {
@@ -86,9 +86,8 @@ bool GetOutputDeviceData(XID output,
if (!GetEDIDProperty(output, &edid))
return false;
- bool result = ParseOutputDeviceData(
- edid, manufacturer_id, human_readable_name);
- return result;
+ return ParseOutputDeviceData(edid, manufacturer_id, human_readable_name,
+ nullptr, nullptr);
}
} // namespace
@@ -106,7 +105,7 @@ bool GetDisplayId(XID output_id,
std::string GetDisplayName(RROutput output) {
std::string display_name;
- GetOutputDeviceData(output, NULL, &display_name);
+ GetOutputDeviceData(output, nullptr, &display_name);
return display_name;
}

Powered by Google App Engine
This is Rietveld 408576698