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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. Created 4 years, 3 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
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 b2f5729e35e8cbd014f164db2365da85e18e692f..4d9c60a2a161daa4a27acbaf269eb1d3218ecdfd 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_GR88)
+// TODO(dshwang): after most linux and libdrm has this definition, remove it.
+#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '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')
@@ -329,6 +333,8 @@ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
switch (format) {
case gfx::BufferFormat::R_8:
return DRM_FORMAT_R8;
+ case gfx::BufferFormat::RG_88:
+ return DRM_FORMAT_GR88;
case gfx::BufferFormat::RGBA_8888:
return DRM_FORMAT_ABGR8888;
case gfx::BufferFormat::RGBX_8888:
@@ -353,6 +359,8 @@ gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format) {
switch (format) {
case DRM_FORMAT_R8:
return gfx::BufferFormat::R_8;
+ case DRM_FORMAT_GR88:
+ return gfx::BufferFormat::RG_88;
case DRM_FORMAT_ABGR8888:
return gfx::BufferFormat::RGBA_8888;
case DRM_FORMAT_XBGR8888:

Powered by Google App Engine
This is Rietveld 408576698