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

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

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Fix switch 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
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b6d10c2a25e23d7bd97837ee1a7a4214173a19e4 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;
}
@@ -117,6 +118,8 @@ bool IsGpuMemoryBufferFormatSupported(gfx::BufferFormat format,
case gfx::BufferFormat::RGBX_8888:
case gfx::BufferFormat::YVU_420:
return true;
+ case gfx::BufferFormat::RGBA_F16:
+ return capabilities.texture_half_float_linear;
reveman 2017/03/31 09:13:55 This looks fine but we should probably rename this
ccameron 2017/04/11 07:45:11 Thanks for the clarification -- I've gone ahead an
case gfx::BufferFormat::YUV_420_BIPLANAR:
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// TODO(dcastagna): Determine ycbcr_420v_image on CrOS at runtime
@@ -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:
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698