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

Unified Diff: ui/ozone/platform/drm/common/drm_util.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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
« no previous file with comments | « ui/ozone/platform/drm/BUILD.gn ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3e0804e701cd3cb30153eb375aa52020a4ce5295..8b15ab6e554f0a4d545bf2e031ab24f30104192e 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -116,14 +116,6 @@ int GetDrmProperty(int fd,
return -1;
}
-std::string GetNameForEnumValue(drmModePropertyRes* property, uint32_t value) {
- for (int i = 0; i < property->count_enums; ++i)
- if (property->enums[i].value == value)
- return property->enums[i].name;
-
- return std::string();
-}
-
ScopedDrmPropertyBlobPtr GetDrmPropertyBlob(int fd,
drmModeConnector* connector,
const std::string& name) {
@@ -140,16 +132,6 @@ ScopedDrmPropertyBlobPtr GetDrmPropertyBlob(int fd,
return nullptr;
}
-bool IsAspectPreserving(int fd, drmModeConnector* connector) {
- ScopedDrmPropertyPtr property;
- int index = GetDrmProperty(fd, connector, "scaling mode", &property);
- if (index < 0)
- return false;
-
- return (GetNameForEnumValue(property.get(), connector->prop_values[index]) ==
- "Full aspect");
-}
-
} // namespace
HardwareDisplayControllerInfo::HardwareDisplayControllerInfo(
@@ -217,8 +199,6 @@ DisplaySnapshot_Params CreateDisplaySnapshotParams(
params.physical_size =
gfx::Size(info->connector()->mmWidth, info->connector()->mmHeight);
params.type = GetDisplayType(info->connector());
- params.is_aspect_preserving_scaling =
- IsAspectPreserving(fd, info->connector());
ScopedDrmPropertyBlobPtr edid_blob(
GetDrmPropertyBlob(fd, info->connector(), "EDID"));
@@ -231,10 +211,6 @@ DisplaySnapshot_Params CreateDisplaySnapshotParams(
if (!GetDisplayIdFromEDID(edid, display_index, &params.display_id,
&params.product_id))
params.display_id = display_index;
-
- ParseOutputDeviceData(edid, nullptr, nullptr, &params.display_name, nullptr,
- nullptr);
- ParseOutputOverscanFlag(edid, &params.has_overscan);
} else {
VLOG(1) << "Failed to get EDID blob for connector "
<< info->connector()->connector_id;
« no previous file with comments | « ui/ozone/platform/drm/BUILD.gn ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698