Commit c35f53d8 authored by Sasha McIntosh's avatar Sasha McIntosh Committed by Commit Bot

gpu/mac: Remove viz::UYVY_422 and references.

Part of an ongoing cleanup of unused format uyvy.

Bug: 988538
Change-Id: I327b4a3931cc16a51ccc370ed1730aad36f2ae75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810801Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: default avatarEmily Stark <estark@chromium.org>
Commit-Queue: Sasha McIntosh <sashamcintosh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699469}
parent c198f92e
......@@ -45,7 +45,6 @@ bool IsSupportedPlaybackToMemoryFormat(viz::ResourceFormat format) {
case viz::BGRX_1010102:
case viz::YVU_420:
case viz::YUV_420_BIPLANAR:
case viz::UYVY_422:
case viz::P010:
return false;
}
......@@ -145,7 +144,6 @@ void RasterBufferProvider::PlaybackToMemory(
case viz::BGRX_1010102:
case viz::YVU_420:
case viz::YUV_420_BIPLANAR:
case viz::UYVY_422:
case viz::P010:
NOTREACHED();
return;
......
......@@ -29,7 +29,6 @@ enum ResourceFormat {
BGRX_1010102,
YVU_420,
YUV_420_BIPLANAR,
UYVY_422,
P010,
RESOURCE_FORMAT_MAX = P010,
};
......
......@@ -50,7 +50,6 @@ SkColorType ResourceFormatToClosestSkColorType(bool gpu_compositing,
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
return kN32_SkColorType;
case RGBA_F16:
......@@ -78,7 +77,6 @@ int BitsPerPixel(ResourceFormat format) {
case R16_EXT:
case BGR_565:
case RG_88:
case UYVY_422:
return 16;
case YVU_420:
case YUV_420_BIPLANAR:
......@@ -116,7 +114,6 @@ bool HasAlpha(ResourceFormat format) {
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
return false;
}
......@@ -146,7 +143,6 @@ unsigned int GLDataType(ResourceFormat format) {
GL_ZERO, // BGRX_1010102
GL_ZERO, // YVU_420
GL_ZERO, // YUV_420_BIPLANAR
GL_ZERO, // UYVY_422
GL_ZERO, // P010
};
static_assert(base::size(format_gl_data_type) == (RESOURCE_FORMAT_MAX + 1),
......@@ -177,7 +173,6 @@ unsigned int GLDataFormat(ResourceFormat format) {
GL_ZERO, // BGRX_1010102
GL_ZERO, // YVU_420
GL_ZERO, // YUV_420_BIPLANAR
GL_ZERO, // UYVY_422
GL_ZERO, // P010
};
static_assert(base::size(format_gl_data_format) == (RESOURCE_FORMAT_MAX + 1),
......@@ -229,7 +224,6 @@ unsigned int GLCopyTextureInternalFormat(ResourceFormat format) {
GL_ZERO, // BGRX_1010102
GL_ZERO, // YVU_420
GL_ZERO, // YUV_420_BIPLANAR
GL_ZERO, // UYVY_422
GL_ZERO, // P010
};
......@@ -271,7 +265,6 @@ gfx::BufferFormat BufferFormat(ResourceFormat format) {
return gfx::BufferFormat::YUV_420_BIPLANAR;
case P010:
return gfx::BufferFormat::P010;
case UYVY_422:
case ETC1:
case ALPHA_8:
case LUMINANCE_8:
......@@ -322,7 +315,6 @@ unsigned int TextureStorageFormat(ResourceFormat format) {
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
break;
}
......@@ -354,7 +346,6 @@ bool IsGpuMemoryBufferFormatSupported(ResourceFormat format) {
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
return false;
}
......@@ -384,7 +375,6 @@ bool IsBitmapFormatSupported(ResourceFormat format) {
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
return false;
}
......@@ -436,7 +426,6 @@ bool GLSupportsFormat(ResourceFormat format) {
case BGRX_1010102:
case YVU_420:
case YUV_420_BIPLANAR:
case UYVY_422:
case P010:
return false;
default:
......@@ -482,7 +471,6 @@ VkFormat ToVkFormat(ResourceFormat format) {
case YUV_420_BIPLANAR:
return VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
case LUMINANCE_F16:
case UYVY_422:
case ETC1:
case P010:
break;
......
......@@ -135,7 +135,6 @@ _NAMED_TYPE_INFO = {
'viz::ResourceFormat::BGRX_1010102',
'viz::ResourceFormat::YVU_420',
'viz::ResourceFormat::YUV_420_BIPLANAR',
'viz::ResourceFormat::UYVY_422',
],
'invalid': [
......
......@@ -81,7 +81,6 @@ static const viz::ResourceFormat valid_viz_resource_format_table[] = {
viz::ResourceFormat::RGBX_8888, viz::ResourceFormat::BGRX_8888,
viz::ResourceFormat::RGBX_1010102, viz::ResourceFormat::BGRX_1010102,
viz::ResourceFormat::YVU_420, viz::ResourceFormat::YUV_420_BIPLANAR,
viz::ResourceFormat::UYVY_422,
};
Validators::Validators()
......
......@@ -290,7 +290,7 @@ TEST_F(SharedImageBackingFactoryAHBTest, InvalidFormat) {
return;
auto mailbox = Mailbox::GenerateForSharedImage();
auto format = viz::ResourceFormat::UYVY_422;
auto format = viz::ResourceFormat::YUV_420_BIPLANAR;
gfx::Size size(256, 256);
auto color_space = gfx::ColorSpace::CreateSRGB();
uint32_t usage = SHARED_IMAGE_USAGE_GLES2;
......
......@@ -461,7 +461,7 @@ TEST_P(SharedImageBackingFactoryGLTextureTest, InitialDataWrongSize) {
TEST_P(SharedImageBackingFactoryGLTextureTest, InvalidFormat) {
auto mailbox = Mailbox::GenerateForSharedImage();
auto format = viz::ResourceFormat::UYVY_422;
auto format = viz::ResourceFormat::YUV_420_BIPLANAR;
gfx::Size size(256, 256);
auto color_space = gfx::ColorSpace::CreateSRGB();
uint32_t usage = SHARED_IMAGE_USAGE_GLES2;
......
......@@ -23,7 +23,6 @@ enum BufferFormat {
RGBA_F16,
YVU_420,
YUV_420_BIPLANAR,
UYVY_422,
P010,
};
......
......@@ -102,9 +102,6 @@ struct EnumTraits<gfx::mojom::BufferFormat, gfx::BufferFormat> {
case gfx::mojom::BufferFormat::P010:
*out = gfx::BufferFormat::P010;
return true;
// TODO(crbug.com/988538): remove
case gfx::mojom::BufferFormat::UYVY_422:
return false;
}
NOTREACHED();
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment