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

Unified Diff: ui/gfx/mac/io_surface.cc

Issue 2920793005: gpu: support R16 GPUMemoryBuffer (Closed)
Patch Set: Created 3 years, 7 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: ui/gfx/mac/io_surface.cc
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 90dadff5dd1100e922b5953d115a89f68b93a763..47fefb562a3c083b0766812111ddd469aebde832 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -46,6 +46,7 @@ int32_t BytesPerElement(gfx::BufferFormat format, int plane) {
static int32_t bytes_per_element[] = {1, 2};
DCHECK_LT(static_cast<size_t>(plane), arraysize(bytes_per_element));
return bytes_per_element[plane];
+ case gfx::BufferFormat::R_16:
case gfx::BufferFormat::RG_88:
case gfx::BufferFormat::UYVY_422:
DCHECK_EQ(plane, 0);
@@ -81,6 +82,7 @@ int32_t PixelFormat(gfx::BufferFormat format) {
return '420v';
case gfx::BufferFormat::UYVY_422:
return '2vuy';
+ case gfx::BufferFormat::R_16:
case gfx::BufferFormat::RG_88:
case gfx::BufferFormat::ATC:
case gfx::BufferFormat::ATCIA:

Powered by Google App Engine
This is Rietveld 408576698