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

Unified Diff: gpu/command_buffer/service/image_factory.cc

Issue 1316493004: Add support for converting I420 software frames into NV12 hardware frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 years, 4 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: gpu/command_buffer/service/image_factory.cc
diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc
index 75e5d2218a9671545ebe573948c26e953d882b58..c47863c41da3558e0ee8878fd86207797cf836f2 100644
--- a/gpu/command_buffer/service/image_factory.cc
+++ b/gpu/command_buffer/service/image_factory.cc
@@ -77,6 +77,8 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
return format == DefaultBufferFormatForImageFormat(internalformat);
case gfx::BufferFormat::RGBA_4444:
return internalformat == GL_RGBA;
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return internalformat == GL_R8;
case gfx::BufferFormat::UYVY_422:
return internalformat == GL_RGB;
}
@@ -107,6 +109,7 @@ bool ImageFactory::IsGpuMemoryBufferFormatSupported(
case gfx::BufferFormat::RGBA_8888:
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
case gfx::BufferFormat::UYVY_422:
return true;
}
@@ -135,6 +138,7 @@ bool ImageFactory::IsImageSizeValidForGpuMemoryBufferFormat(
case gfx::BufferFormat::BGRX_8888:
return true;
case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
// U and V planes are subsampled by a factor of 2.
return size.width() % 2 == 0 && size.height() % 2 == 0;
case gfx::BufferFormat::UYVY_422:
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_io_surface.cc ('k') | gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698