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

Unified Diff: gpu/command_buffer/common/gpu_memory_buffer_support.cc

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Re-add software support Created 3 years, 9 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: 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:

Powered by Google App Engine
This is Rietveld 408576698