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

Unified Diff: ui/gl/gl_image_native_pixmap.cc

Issue 2689453002: Introduce gfx::BufferFormat::YUYV_422
Patch Set: rebase to ToT Created 3 years, 7 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/gl_image_memory.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_native_pixmap.cc
diff --git a/ui/gl/gl_image_native_pixmap.cc b/ui/gl/gl_image_native_pixmap.cc
index d29de1caacdfdcd470d9fc28df5cb083128d68dc..e955335c572dd2031ca39f1066e4bdbc7bf7081c 100644
--- a/ui/gl/gl_image_native_pixmap.cc
+++ b/ui/gl/gl_image_native_pixmap.cc
@@ -22,6 +22,7 @@
#define DRM_FORMAT_XBGR8888 FOURCC('X', 'B', '2', '4')
#define DRM_FORMAT_YVU420 FOURCC('Y', 'V', '1', '2')
#define DRM_FORMAT_NV12 FOURCC('N', 'V', '1', '2')
+#define DRM_FORMAT_YUYV FOURCC('Y', 'U', 'Y', 'V')
namespace gl {
namespace {
@@ -36,6 +37,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 +63,7 @@ bool ValidFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::YVU_420:
case gfx::BufferFormat::YUV_420_BIPLANAR:
+ case gfx::BufferFormat::YUYV_422:
return true;
case gfx::BufferFormat::ATC:
case gfx::BufferFormat::ATCIA:
@@ -96,6 +100,8 @@ EGLint FourCC(gfx::BufferFormat format) {
return DRM_FORMAT_YVU420;
case gfx::BufferFormat::YUV_420_BIPLANAR:
return DRM_FORMAT_NV12;
+ case gfx::BufferFormat::YUYV_422:
+ return DRM_FORMAT_YUYV;
case gfx::BufferFormat::ATC:
case gfx::BufferFormat::ATCIA:
case gfx::BufferFormat::DXT1:
@@ -272,6 +278,7 @@ unsigned GLImageNativePixmap::GetInternalFormatForTesting(
case gfx::BufferFormat::RGBA_4444:
case gfx::BufferFormat::RGBA_F16:
case gfx::BufferFormat::UYVY_422:
+ case gfx::BufferFormat::YUYV_422:
NOTREACHED();
return GL_NONE;
}
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698