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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display_snapshot.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: 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
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/gpu/drm_display_snapshot.h" 5 #include "ui/ozone/platform/drm/gpu/drm_display_snapshot.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <xf86drmMode.h> 9 #include <xf86drmMode.h>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 drm_(drm), 84 drm_(drm),
85 connector_(connector->connector_id), 85 connector_(connector->connector_id),
86 crtc_(crtc->crtc_id) { 86 crtc_(crtc->crtc_id) {
87 ScopedDrmPropertyBlobPtr edid_blob(drm->GetPropertyBlob(connector, "EDID")); 87 ScopedDrmPropertyBlobPtr edid_blob(drm->GetPropertyBlob(connector, "EDID"));
88 88
89 if (edid_blob) { 89 if (edid_blob) {
90 std::vector<uint8_t> edid( 90 std::vector<uint8_t> edid(
91 static_cast<uint8_t*>(edid_blob->data), 91 static_cast<uint8_t*>(edid_blob->data),
92 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length); 92 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length);
93 93
94 if (!GetDisplayIdFromEDID(edid, index, &display_id_)) 94 if (!GetDisplayIdFromEDID(edid, index, &display_id_, &product_id_))
95 display_id_ = index; 95 display_id_ = index;
96 96
97 ParseOutputDeviceData(edid, nullptr, &display_name_, nullptr, nullptr); 97 ParseOutputDeviceData(edid, nullptr, &display_name_, nullptr, nullptr);
98 ParseOutputOverscanFlag(edid, &overscan_flag_); 98 ParseOutputOverscanFlag(edid, &overscan_flag_);
99 } else { 99 } else {
100 VLOG(1) << "Failed to get EDID blob for connector " 100 VLOG(1) << "Failed to get EDID blob for connector "
101 << connector->connector_id; 101 << connector->connector_id;
102 } 102 }
103 103
104 for (int i = 0; i < connector->count_modes; ++i) { 104 for (int i = 0; i < connector->count_modes; ++i) {
(...skipping 19 matching lines...) Expand all
124 std::string DrmDisplaySnapshot::ToString() const { 124 std::string DrmDisplaySnapshot::ToString() const {
125 return base::StringPrintf( 125 return base::StringPrintf(
126 "[type=%d, connector=%" PRIu32 ", crtc=%" PRIu32 126 "[type=%d, connector=%" PRIu32 ", crtc=%" PRIu32
127 ", origin=%s, mode=%s, dim=%s]", 127 ", origin=%s, mode=%s, dim=%s]",
128 type_, connector_, crtc_, origin_.ToString().c_str(), 128 type_, connector_, crtc_, origin_.ToString().c_str(),
129 current_mode_ ? current_mode_->ToString().c_str() : "NULL", 129 current_mode_ ? current_mode_->ToString().c_str() : "NULL",
130 physical_size_.ToString().c_str()); 130 physical_size_.ToString().c_str());
131 } 131 }
132 132
133 } // namespace ui 133 } // namespace ui
OLDNEW
« ui/display/types/display_snapshot.h ('K') | « 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