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

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

Issue 2413853003: ozone: Don't sort YV channels for CrCb formats. (Closed)
Patch Set: Created 4 years, 2 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/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 238ff70b121c8447fe52ccc0e2255733551e3bee..aafabef689f2bd2755a8bfa7e9c809984c800ee2 100644
--- a/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/ozone/gl/gl_image_ozone_native_pixmap.cc
@@ -110,33 +110,6 @@ EGLint FourCC(gfx::BufferFormat format) {
return 0;
}
-#if !defined(ARCH_CPU_X86_FAMILY)
-bool IsFormatCrCb(gfx::BufferFormat format) {
- switch (format) {
- case gfx::BufferFormat::YVU_420:
- return true;
- 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:
- case gfx::BufferFormat::BGRA_8888:
- case gfx::BufferFormat::BGRX_8888:
- 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::YUV_420_BIPLANAR:
- case gfx::BufferFormat::UYVY_422:
- return false;
- }
- NOTREACHED();
- return false;
-}
-#endif
-
} // namespace
GLImageOzoneNativePixmap::GLImageOzoneNativePixmap(const gfx::Size& size,
@@ -193,20 +166,6 @@ bool GLImageOzoneNativePixmap::Initialize(NativePixmap* pixmap,
size_t pixmap_plane = attrs_plane;
-// TODO(dcastagna): Intel mesa flips V and U when the fourcc format is a
-// CrCb format therefore we don't need to.
-// Once crbug.com/646137 is addressed this ifdef (but not its content) can be
-// removed.
-#if !defined(ARCH_CPU_X86_FAMILY)
- // EGL_EXT_image_dma_buf_import always expects U and V as plane 1 and 2 in
- // case of a YUV/YVU format. We swap U and V plane indexes for CrCb
- // multi-planar formats.
- if (IsFormatCrCb(format) &&
- gfx::NumberOfPlanesForBufferFormat(pixmap->GetBufferFormat()) == 3 &&
- attrs_plane) {
- pixmap_plane = 3 - attrs_plane;
- }
-#endif
attrs.push_back(pixmap->GetDmaBufFd(
pixmap_plane < pixmap->GetDmaBufFdCount() ? pixmap_plane : 0));
attrs.push_back(EGL_DMA_BUF_PLANE0_OFFSET_EXT + attrs_plane * 3);
« 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