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

Unified Diff: components/view_manager/gles2/mojo_gpu_memory_buffer.cc

Issue 1282313002: Add YUV_420_BIPLANAR to gfx::BufferFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmb-planes
Patch Set: Fixes for reveman 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: components/view_manager/gles2/mojo_gpu_memory_buffer.cc
diff --git a/components/view_manager/gles2/mojo_gpu_memory_buffer.cc b/components/view_manager/gles2/mojo_gpu_memory_buffer.cc
index be146f5eeb747a3422bf58c758e9859b83648da6..30fdc4dd4bfb109cad9b49708a38a87fdabae868 100644
--- a/components/view_manager/gles2/mojo_gpu_memory_buffer.cc
+++ b/components/view_manager/gles2/mojo_gpu_memory_buffer.cc
@@ -31,6 +31,11 @@ size_t SubsamplingFactor(gfx::BufferFormat format, int plane) {
DCHECK_LT(static_cast<size_t>(plane), arraysize(factor));
return factor[plane];
}
+ case gfx::BufferFormat::YUV_420_BIPLANAR: {
+ static size_t factor[] = {1, 2};
+ DCHECK_LT(static_cast<size_t>(plane), arraysize(factor));
+ return factor[plane];
+ }
}
NOTREACHED();
return 0;
@@ -60,6 +65,8 @@ size_t StrideInBytes(size_t width, gfx::BufferFormat format, int plane) {
return width * 4;
case gfx::BufferFormat::YUV_420:
return width / SubsamplingFactor(format, plane);
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return width;
}
NOTREACHED();
return 0;

Powered by Google App Engine
This is Rietveld 408576698