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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.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: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
index 88bb590755a6f2e31996e8555aa5be3424503137..efee320ad5a0159e04852e258b6596fa8b2f32e4 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
@@ -109,6 +109,7 @@ bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(
case gfx::BufferFormat::RGBA_8888:
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
case gfx::BufferFormat::UYVY_422:
return true;
case gfx::BufferFormat::BGRX_8888:
@@ -151,7 +152,8 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::BGRX_8888:
return true;
- case gfx::BufferFormat::YUV_420: {
+ case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR: {
size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format);
for (size_t i = 0; i < num_planes; ++i) {
size_t factor = SubsamplingFactor(format, i);

Powered by Google App Engine
This is Rietveld 408576698