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

Unified Diff: gpu/command_buffer/service/image_factory.cc

Issue 1327513003: Merge to M46 for BUG=510252 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2490
Patch Set: Created 5 years, 3 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 | « no previous file | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/image_factory.cc
diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc
index 75e5d2218a9671545ebe573948c26e953d882b58..d8c86b5a53945fb63450b2a1ba4c0e096bf96f68 100644
--- a/gpu/command_buffer/service/image_factory.cc
+++ b/gpu/command_buffer/service/image_factory.cc
@@ -39,6 +39,8 @@ gfx::BufferFormat ImageFactory::DefaultBufferFormatForImageFormat(
return gfx::BufferFormat::ETC1;
case GL_RGB_YUV_420_CHROMIUM:
return gfx::BufferFormat::YUV_420;
+ case GL_RGB_YCBCR_422_CHROMIUM:
+ return gfx::BufferFormat::UYVY_422;
default:
NOTREACHED();
return gfx::BufferFormat::RGBA_8888;
@@ -74,11 +76,10 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
case gfx::BufferFormat::R_8:
case gfx::BufferFormat::RGBA_8888:
case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::UYVY_422:
return format == DefaultBufferFormatForImageFormat(internalformat);
case gfx::BufferFormat::RGBA_4444:
return internalformat == GL_RGBA;
- case gfx::BufferFormat::UYVY_422:
- return internalformat == GL_RGB;
}
NOTREACHED();
@@ -103,11 +104,12 @@ bool ImageFactory::IsGpuMemoryBufferFormatSupported(
return capabilities.texture_format_etc1;
case gfx::BufferFormat::R_8:
return capabilities.texture_rg;
+ case gfx::BufferFormat::UYVY_422:
+ return capabilities.image_ycbcr_422;
case gfx::BufferFormat::RGBA_4444:
case gfx::BufferFormat::RGBA_8888:
case gfx::BufferFormat::BGRX_8888:
case gfx::BufferFormat::YUV_420:
- case gfx::BufferFormat::UYVY_422:
return true;
}
« no previous file with comments | « no previous file | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698