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

Side by Side Diff: ui/display/util/x11/edid_parser_x11.cc

Issue 1129863003: Load ICC file for display color correction based on display product identifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nuked extra {} 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 unified diff | Download patch
« no previous file with comments | « ui/display/util/edid_parser_unittest.cc ('k') | ui/ozone/common/display_snapshot_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/display/util/x11/edid_parser_x11.h" 5 #include "ui/display/util/x11/edid_parser_x11.h"
6 6
7 #include <X11/extensions/Xrandr.h> 7 #include <X11/extensions/Xrandr.h>
8 #include <X11/Xatom.h> 8 #include <X11/Xatom.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 } // namespace 93 } // namespace
94 94
95 bool GetDisplayId(XID output_id, 95 bool GetDisplayId(XID output_id,
96 uint8_t output_index, 96 uint8_t output_index,
97 int64_t* display_id_out) { 97 int64_t* display_id_out) {
98 std::vector<uint8_t> edid; 98 std::vector<uint8_t> edid;
99 if (!GetEDIDProperty(output_id, &edid)) 99 if (!GetEDIDProperty(output_id, &edid))
100 return false; 100 return false;
101 101
102 bool result = GetDisplayIdFromEDID(edid, output_index, display_id_out); 102 bool result =
103 GetDisplayIdFromEDID(edid, output_index, display_id_out, nullptr);
103 return result; 104 return result;
104 } 105 }
105 106
106 std::string GetDisplayName(RROutput output) { 107 std::string GetDisplayName(RROutput output) {
107 std::string display_name; 108 std::string display_name;
108 GetOutputDeviceData(output, nullptr, &display_name); 109 GetOutputDeviceData(output, nullptr, &display_name);
109 return display_name; 110 return display_name;
110 } 111 }
111 112
112 bool GetOutputOverscanFlag(RROutput output, bool* flag) { 113 bool GetOutputOverscanFlag(RROutput output, bool* flag) {
113 std::vector<uint8_t> edid; 114 std::vector<uint8_t> edid;
114 if (!GetEDIDProperty(output, &edid)) 115 if (!GetEDIDProperty(output, &edid))
115 return false; 116 return false;
116 117
117 bool found = ParseOutputOverscanFlag(edid, flag); 118 bool found = ParseOutputOverscanFlag(edid, flag);
118 return found; 119 return found;
119 } 120 }
120 121
121 } // namespace ui 122 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/util/edid_parser_unittest.cc ('k') | ui/ozone/common/display_snapshot_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698