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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Review feedback Created 3 years, 8 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 | « ui/gfx/mojo/buffer_types_struct_traits.h ('k') | ui/gl/gl_image_io_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_io_surface.mm
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index 7d6564b2dd28c38f06f24efc324c86e56261ee4a..7bcb9626b9a741949799ac4d19a352ed0ac8eb45 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -50,6 +50,7 @@ bool ValidFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::RGBA_8888:
+ case gfx::BufferFormat::RGBA_F16:
case gfx::BufferFormat::UYVY_422:
case gfx::BufferFormat::YUV_420_BIPLANAR:
return true;
@@ -79,6 +80,7 @@ GLenum TextureFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRA_8888:
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::RGBA_8888:
+ case gfx::BufferFormat::RGBA_F16:
return GL_RGBA;
case gfx::BufferFormat::UYVY_422:
return GL_RGB;
@@ -111,6 +113,8 @@ GLenum DataFormat(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::RGBA_8888:
return GL_BGRA;
+ case gfx::BufferFormat::RGBA_F16:
+ return GL_RGBA;
case gfx::BufferFormat::UYVY_422:
return GL_YCBCR_422_APPLE;
case gfx::BufferFormat::ATC:
@@ -140,6 +144,8 @@ GLenum DataType(gfx::BufferFormat format) {
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::RGBA_8888:
return GL_UNSIGNED_INT_8_8_8_8_REV;
+ case gfx::BufferFormat::RGBA_F16:
+ return GL_HALF_APPLE;
case gfx::BufferFormat::UYVY_422:
return GL_UNSIGNED_SHORT_8_8_APPLE;
break;
« no previous file with comments | « ui/gfx/mojo/buffer_types_struct_traits.h ('k') | ui/gl/gl_image_io_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698