| Index: ui/ozone/platform/drm/common/drm_util.cc
|
| diff --git a/ui/ozone/platform/drm/common/drm_util.cc b/ui/ozone/platform/drm/common/drm_util.cc
|
| index eb98ea0044ccb972fab9e9357dda4bf1c2f93137..86807f645ea29d03f68de7c3290c22edadf1887b 100644
|
| --- a/ui/ozone/platform/drm/common/drm_util.cc
|
| +++ b/ui/ozone/platform/drm/common/drm_util.cc
|
| @@ -156,6 +156,19 @@ int ConnectorIndex(int device_index, int display_index) {
|
| return ((device_index << 4) + display_index) & 0xFF;
|
| }
|
|
|
| +bool HasColorCorrectionMatrix(int fd, drmModeCrtc* crtc) {
|
| + ScopedDrmObjectPropertyPtr crtc_props(
|
| + drmModeObjectGetProperties(fd, crtc->crtc_id, DRM_MODE_OBJECT_CRTC));
|
| +
|
| + for (uint32_t i = 0; i < crtc_props->count_props; ++i) {
|
| + ScopedDrmPropertyPtr property(drmModeGetProperty(fd, crtc_props->props[i]));
|
| + if (property && !strcmp(property->name, "CTM")) {
|
| + return true;
|
| + }
|
| + }
|
| + return false;
|
| +}
|
| +
|
| } // namespace
|
|
|
| HardwareDisplayControllerInfo::HardwareDisplayControllerInfo(
|
| @@ -226,6 +239,8 @@ DisplaySnapshot_Params CreateDisplaySnapshotParams(
|
| params.type = GetDisplayType(info->connector());
|
| params.is_aspect_preserving_scaling =
|
| IsAspectPreserving(fd, info->connector());
|
| + params.has_color_correction_matrix =
|
| + HasColorCorrectionMatrix(fd, info->crtc());
|
|
|
| ScopedDrmPropertyBlobPtr edid_blob(
|
| GetDrmPropertyBlob(fd, info->connector(), "EDID"));
|
|
|