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

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

Issue 2094863002: ozone: Add YV12 to drm_util.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | 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 b18f28956299d585ffec970f9ce8ca0c90ec0009..c8a67037ef67a2c9e59b897e6ddaa283ead80b49 100644
--- a/ui/ozone/platform/drm/common/drm_util.cc
+++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -30,6 +30,10 @@
// TODO(dshwang): after most linux and libdrm has this definition, remove it.
#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
#endif
+#if !defined(DRM_FORMAT_YV12)
+// TODO(dcastagna): after libdrm has this definition, remove it.
+#define DRM_FORMAT_YV12 fourcc_code('Y', 'V', '1', '2')
+#endif
namespace ui {
@@ -335,6 +339,8 @@ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
return DRM_FORMAT_XRGB8888;
case gfx::BufferFormat::UYVY_422:
return DRM_FORMAT_UYVY;
+ case gfx::BufferFormat::YVU_420:
+ return DRM_FORMAT_YV12;
default:
NOTREACHED();
return 0;
@@ -355,6 +361,8 @@ gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format) {
return gfx::BufferFormat::BGRX_8888;
case DRM_FORMAT_UYVY:
return gfx::BufferFormat::UYVY_422;
+ case DRM_FORMAT_YV12:
+ return gfx::BufferFormat::YVU_420;
default:
NOTREACHED();
return gfx::BufferFormat::BGRA_8888;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698