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

Side by Side Diff: ui/ozone/platform/drm/common/drm_util.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/ozone/common/gpu/ozone_gpu_messages.h ('k') | no next file » | 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/ozone/platform/drm/common/drm_util.h" 5 #include "ui/ozone/platform/drm/common/drm_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/mman.h> 9 #include <sys/mman.h>
10 #include <xf86drmMode.h> 10 #include <xf86drmMode.h>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 IsAspectPreserving(fd, info->connector()); 220 IsAspectPreserving(fd, info->connector());
221 221
222 ScopedDrmPropertyBlobPtr edid_blob( 222 ScopedDrmPropertyBlobPtr edid_blob(
223 GetDrmPropertyBlob(fd, info->connector(), "EDID")); 223 GetDrmPropertyBlob(fd, info->connector(), "EDID"));
224 224
225 if (edid_blob) { 225 if (edid_blob) {
226 std::vector<uint8_t> edid( 226 std::vector<uint8_t> edid(
227 static_cast<uint8_t*>(edid_blob->data), 227 static_cast<uint8_t*>(edid_blob->data),
228 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length); 228 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length);
229 229
230 if (!GetDisplayIdFromEDID(edid, display_index, &params.display_id)) 230 if (!GetDisplayIdFromEDID(edid, display_index, &params.display_id,
231 &params.product_id))
231 params.display_id = display_index; 232 params.display_id = display_index;
232 233
233 ParseOutputDeviceData(edid, nullptr, &params.display_name, nullptr, 234 ParseOutputDeviceData(edid, nullptr, &params.display_name, nullptr,
234 nullptr); 235 nullptr);
235 ParseOutputOverscanFlag(edid, &params.has_overscan); 236 ParseOutputOverscanFlag(edid, &params.has_overscan);
236 } else { 237 } else {
237 VLOG(1) << "Failed to get EDID blob for connector " 238 VLOG(1) << "Failed to get EDID blob for connector "
238 << info->connector()->connector_id; 239 << info->connector()->connector_id;
239 } 240 }
240 241
(...skipping 16 matching lines...) Expand all
257 // since it should be the best mode. 258 // since it should be the best mode.
258 if (!params.has_native_mode && !params.modes.empty()) { 259 if (!params.has_native_mode && !params.modes.empty()) {
259 params.has_native_mode = true; 260 params.has_native_mode = true;
260 params.native_mode = params.modes.front(); 261 params.native_mode = params.modes.front();
261 } 262 }
262 263
263 return params; 264 return params;
264 } 265 }
265 266
266 } // namespace ui 267 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/common/gpu/ozone_gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698