Skip to content

Commit

Permalink
Revert of Add NV12 buffer scanout support from exo to ozone. (patchset
Browse files Browse the repository at this point in the history
…chromium#3 id:40001 of https://codereview.chromium.org/2296433002/ )

Reason for revert:
This broke YouTube, Hangout, and camera app on many ChromeOS devices. The video was black. See http://crbug.com/648528.

Original issue's description:
> Add NV12 buffer scanout support from exo to ozone.
>
> Let exo import NV12 scanout buffers and use them to composite.
>
> BUG=646148, b/31159410,b/29625228
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
>
> Committed: https://crrev.com/1e8cdd4dc52fa218459fdc699adc301d36915438
> Cr-Commit-Position: refs/heads/master@{#418096}

TBR=posciak@chromium.org,reveman@chromium.org,sievers@chromium.org,spang@chromium.org,dcastagna@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=646148, b/31159410,b/29625228

Review-Url: https://codereview.chromium.org/2360453003
Cr-Commit-Position: refs/heads/master@{#420031}
  • Loading branch information
wuchengli authored and Commit bot committed Sep 21, 2016
1 parent 1aaa769 commit c7604cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion components/exo/buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ GLenum GLInternalFormat(gfx::BufferFormat format) {
GL_RGB, // BGRX_8888
GL_BGRA_EXT, // BGRA_8888
GL_RGB_YCRCB_420_CHROMIUM, // YVU_420
GL_RGB_YCBCR_420V_CHROMIUM, // YUV_420_BIPLANAR
GL_INVALID_ENUM, // YUV_420_BIPLANAR
GL_RGB_YCBCR_422_CHROMIUM, // UYVY_422
};
static_assert(arraysize(kGLInternalFormats) ==
Expand Down
1 change: 0 additions & 1 deletion components/exo/wayland/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ const struct drm_supported_format {
{WL_DRM_FORMAT_ABGR8888, gfx::BufferFormat::RGBA_8888},
{WL_DRM_FORMAT_XRGB8888, gfx::BufferFormat::BGRX_8888},
{WL_DRM_FORMAT_ARGB8888, gfx::BufferFormat::BGRA_8888},
{WL_DRM_FORMAT_NV12, gfx::BufferFormat::YUV_420_BIPLANAR},
{WL_DRM_FORMAT_YVU420, gfx::BufferFormat::YVU_420}};

void drm_authenticate(wl_client* client, wl_resource* resource, uint32_t id) {
Expand Down
6 changes: 0 additions & 6 deletions gpu/command_buffer/service/feature_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1072,12 +1072,6 @@ void FeatureInfo::InitializeFeatures() {
AddExtensionString("GL_CHROMIUM_ycbcr_420v_image");
feature_flags_.chromium_image_ycbcr_420v = true;
}

#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// TODO(dcastagna): Determine this feature at runtime querying minigbm.
// crbug.com/646148
AddExtensionString("GL_CHROMIUM_ycbcr_420v_image");
feature_flags_.chromium_image_ycbcr_420v = true;
#endif

if (extensions.Contains("GL_APPLE_ycbcr_422")) {
Expand Down
8 changes: 2 additions & 6 deletions ui/ozone/gl/gl_image_ozone_native_pixmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define DRM_FORMAT_XRGB8888 FOURCC('X', 'R', '2', '4')
#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')

namespace ui {
namespace {
Expand All @@ -33,8 +32,6 @@ bool ValidInternalFormat(unsigned internalformat, gfx::BufferFormat format) {
format == gfx::BufferFormat::BGRX_8888;
case GL_RGB_YCRCB_420_CHROMIUM:
return format == gfx::BufferFormat::YVU_420;
case GL_RGB_YCBCR_420V_CHROMIUM:
return format == gfx::BufferFormat::YUV_420_BIPLANAR;
case GL_RGBA:
return format == gfx::BufferFormat::RGBA_8888;
case GL_BGRA_EXT:
Expand All @@ -55,14 +52,14 @@ bool ValidFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::YVU_420:
case gfx::BufferFormat::YUV_420_BIPLANAR:
return true;
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;
}
Expand All @@ -87,14 +84,13 @@ EGLint FourCC(gfx::BufferFormat format) {
return DRM_FORMAT_XRGB8888;
case gfx::BufferFormat::YVU_420:
return DRM_FORMAT_YV12;
case gfx::BufferFormat::YUV_420_BIPLANAR:
return DRM_FORMAT_NV12;
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:
NOTREACHED();
return 0;
Expand Down

0 comments on commit c7604cc

Please sign in to comment.