 Chromium Code Reviews
 Chromium Code Reviews Issue 2786103003:
  Add half-float IOSurface GpuMemoryBuffer support  (Closed)
    
  
    Issue 2786103003:
  Add half-float IOSurface GpuMemoryBuffer support  (Closed) 
  | Index: gpu/command_buffer/common/gpu_memory_buffer_support.cc | 
| diff --git a/gpu/command_buffer/common/gpu_memory_buffer_support.cc b/gpu/command_buffer/common/gpu_memory_buffer_support.cc | 
| index 68237a08fd255e6ffc020f530493d662ffad0290..a78499ff701b053c1a460f70a5a7082a1e8063ee 100644 | 
| --- a/gpu/command_buffer/common/gpu_memory_buffer_support.cc | 
| +++ b/gpu/command_buffer/common/gpu_memory_buffer_support.cc | 
| @@ -84,6 +84,7 @@ bool IsImageFormatCompatibleWithGpuMemoryBufferFormat( | 
| case gfx::BufferFormat::RGBX_8888: | 
| return internalformat == GL_RGB; | 
| case gfx::BufferFormat::RGBA_4444: | 
| + case gfx::BufferFormat::RGBA_F16: | 
| return internalformat == GL_RGBA; | 
| } | 
| @@ -115,6 +116,8 @@ bool IsGpuMemoryBufferFormatSupported(gfx::BufferFormat format, | 
| case gfx::BufferFormat::RGBA_4444: | 
| case gfx::BufferFormat::RGBA_8888: | 
| case gfx::BufferFormat::RGBX_8888: | 
| + case gfx::BufferFormat::RGBA_F16: | 
| + return capabilities.texture_half_float_linear; | 
| 
Daniele Castagna
2017/03/30 21:47:10
Does this return false on all the non-mac platform
 
ccameron
2017/03/30 23:07:03
Ops, this affected the behavior of the above cases
 
Daniele Castagna
2017/03/31 00:25:20
Looking at IsGpuMemoryBufferFormatSupported makes
 | 
| case gfx::BufferFormat::YVU_420: | 
| return true; | 
| case gfx::BufferFormat::YUV_420_BIPLANAR: | 
| @@ -150,6 +153,7 @@ bool IsImageSizeValidForGpuMemoryBufferFormat(const gfx::Size& size, | 
| case gfx::BufferFormat::RGBX_8888: | 
| case gfx::BufferFormat::BGRA_8888: | 
| case gfx::BufferFormat::BGRX_8888: | 
| + case gfx::BufferFormat::RGBA_F16: | 
| return true; | 
| case gfx::BufferFormat::YVU_420: | 
| case gfx::BufferFormat::YUV_420_BIPLANAR: |