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

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

Issue 2122573003: media: replace LUMINANCE_F16 by RG_88 for 9/10-bit h264 videos Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce --disable-half-float-conversion-texture flag 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/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 0c0470e90f74136a17509060e7938e1ad400e142..d24502bb8559b1d6ebff71c05e137c8a3fe37eed 100644
--- a/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
@@ -14,6 +14,7 @@
(static_cast<uint32_t>(c) << 16) | (static_cast<uint32_t>(d) << 24))
#define DRM_FORMAT_R8 FOURCC('R', '8', ' ', ' ')
+#define DRM_FORMAT_GR88 FOURCC('G', 'R', '8', '8')
#define DRM_FORMAT_RGB565 FOURCC('R', 'G', '1', '6')
#define DRM_FORMAT_ARGB8888 FOURCC('A', 'R', '2', '4')
#define DRM_FORMAT_ABGR8888 FOURCC('A', 'B', '2', '4')
@@ -41,6 +42,8 @@ bool ValidInternalFormat(unsigned internalformat, gfx::BufferFormat format) {
return format == gfx::BufferFormat::BGRA_8888;
case GL_RED_EXT:
return format == gfx::BufferFormat::R_8;
+ case GL_RG_EXT:
+ return format == gfx::BufferFormat::RG_88;
default:
return false;
}
@@ -49,6 +52,7 @@ bool ValidInternalFormat(unsigned internalformat, gfx::BufferFormat format) {
bool ValidFormat(gfx::BufferFormat format) {
switch (format) {
case gfx::BufferFormat::R_8:
+ case gfx::BufferFormat::RG_88:
case gfx::BufferFormat::BGR_565:
case gfx::BufferFormat::RGBA_8888:
case gfx::BufferFormat::RGBX_8888:
@@ -75,6 +79,8 @@ EGLint FourCC(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::BGR_565:
return DRM_FORMAT_RGB565;
case gfx::BufferFormat::RGBA_8888:
@@ -287,6 +293,8 @@ unsigned GLImageOzoneNativePixmap::GetInternalFormatForTesting(
switch (format) {
case gfx::BufferFormat::R_8:
return GL_RED_EXT;
+ case gfx::BufferFormat::RG_88:
+ return GL_RG_EXT;
case gfx::BufferFormat::BGR_565:
case gfx::BufferFormat::RGBX_8888:
case gfx::BufferFormat::BGRX_8888:

Powered by Google App Engine
This is Rietveld 408576698