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

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

Issue 1422563002: [Ozone] Enables overlay render format setting path and by default use UYVY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 5e100873f25290962e1604b4205dffb4fff244fd..20e32d38869bf52b82aad600ead1da881ad62d33 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -271,10 +271,25 @@ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
return DRM_FORMAT_ARGB8888;
case gfx::BufferFormat::BGRX_8888:
return DRM_FORMAT_XRGB8888;
+ case gfx::BufferFormat::UYVY_422:
+ return DRM_FORMAT_UYVY;
default:
NOTREACHED();
return 0;
}
}
+gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format) {
+ switch (format) {
+ case DRM_FORMAT_ARGB8888:
+ return gfx::BufferFormat::BGRA_8888;
+ case DRM_FORMAT_XRGB8888:
+ return gfx::BufferFormat::BGRX_8888;
+ case DRM_FORMAT_UYVY:
+ return gfx::BufferFormat::UYVY_422;
+ default:
+ NOTREACHED();
+ return gfx::BufferFormat::LAST;
+ }
+}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698