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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 1282313002: Add YUV_420_BIPLANAR to gfx::BufferFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmb-planes
Patch Set: Rebase 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
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gfx/buffer_format_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 548935823c0f599ccfde32d4a7b70f664be8ba3a..7897d1635cd0c3b9e48ad539bd524088d46d20c6 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -58,6 +58,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;
@@ -89,6 +94,8 @@ size_t StrideInBytes(size_t width, gfx::BufferFormat format, int plane) {
return 0;
case gfx::BufferFormat::YUV_420:
return width / SubsamplingFactor(format, plane);
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return width;
}
NOTREACHED();
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gfx/buffer_format_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698