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

Unified Diff: ui/ozone/gl/gl_image_ozone_native_pixmap.cc

Issue 2636433003: [NotForReview] Enable YUV video overlay on Skylake ChromeOS.
Patch Set: Created 3 years, 11 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/gl/test/gl_image_test_support.cc ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/gl/gl_image_ozone_native_pixmap.cc
diff --git a/ui/ozone/gl/gl_image_ozone_native_pixmap.cc b/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
index 594a09db88a0a0a6a1602ca1d3e336af8c5f2a03..0d865b0f055639d1d9f09748f24c457e48e23ed6 100644
--- a/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
@@ -22,6 +22,8 @@
#define DRM_FORMAT_XBGR8888 FOURCC('X', 'B', '2', '4')
#define DRM_FORMAT_YV12 FOURCC('Y', 'V', '1', '2')
#define DRM_FORMAT_NV12 FOURCC('N', 'V', '1', '2')
+#define DRM_FORMAT_UYVY FOURCC('U', 'Y', 'V', 'Y')
+#define DRM_FORMAT_YUYV FOURCC('Y', 'U', 'Y', 'V')
namespace ui {
namespace {
@@ -36,6 +38,8 @@ bool ValidInternalFormat(unsigned internalformat, gfx::BufferFormat format) {
return format == gfx::BufferFormat::YVU_420;
case GL_RGB_YCBCR_420V_CHROMIUM:
return format == gfx::BufferFormat::YUV_420_BIPLANAR;
+ case GL_RGB_YCBCR_422_CHROMIUM:
+ return format == gfx::BufferFormat::YUYV_422;
case GL_RGBA:
return format == gfx::BufferFormat::RGBA_8888;
case GL_BGRA_EXT:
@@ -60,6 +64,8 @@ bool ValidFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::YVU_420:
case gfx::BufferFormat::YUV_420_BIPLANAR:
+ case gfx::BufferFormat::UYVY_422:
+ case gfx::BufferFormat::YUYV_422:
return true;
case gfx::BufferFormat::ATC:
case gfx::BufferFormat::ATCIA:
@@ -67,7 +73,6 @@ bool ValidFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::DXT5:
case gfx::BufferFormat::ETC1:
case gfx::BufferFormat::RGBA_4444:
- case gfx::BufferFormat::UYVY_422:
return false;
}
@@ -95,13 +100,17 @@ EGLint FourCC(gfx::BufferFormat format) {
return DRM_FORMAT_YV12;
case gfx::BufferFormat::YUV_420_BIPLANAR:
return DRM_FORMAT_NV12;
+ case gfx::BufferFormat::UYVY_422:
+ return DRM_FORMAT_UYVY;
+ case gfx::BufferFormat::YUYV_422:
+ return DRM_FORMAT_YUYV;
case gfx::BufferFormat::ATC:
case gfx::BufferFormat::ATCIA:
case gfx::BufferFormat::DXT1:
case gfx::BufferFormat::DXT5:
case gfx::BufferFormat::ETC1:
case gfx::BufferFormat::RGBA_4444:
- case gfx::BufferFormat::UYVY_422:
+
NOTREACHED();
return 0;
}
@@ -270,6 +279,7 @@ unsigned GLImageOzoneNativePixmap::GetInternalFormatForTesting(
case gfx::BufferFormat::ETC1:
case gfx::BufferFormat::RGBA_4444:
case gfx::BufferFormat::UYVY_422:
+ case gfx::BufferFormat::YUYV_422:
NOTREACHED();
return GL_NONE;
}
« no previous file with comments | « ui/gl/test/gl_image_test_support.cc ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698