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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 1316493004: Add support for converting I420 software frames into NV12 hardware frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 years, 4 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/buffer_types.h ('k') | ui/gl/gl_image_memory.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 fa4395c4194765c5ab7e8daf171b58b5acad2d03..a5ff01f7d1fd0e5a68c9e33e1b8b1d88289c8567 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -37,6 +37,7 @@ bool ValidFormat(BufferFormat format) {
case BufferFormat::R_8:
case BufferFormat::BGRA_8888:
case BufferFormat::UYVY_422:
+ case BufferFormat::YUV_420_BIPLANAR:
return true;
case BufferFormat::ATC:
case BufferFormat::ATCIA:
@@ -57,6 +58,7 @@ bool ValidFormat(BufferFormat format) {
GLenum TextureFormat(BufferFormat format) {
switch (format) {
case BufferFormat::R_8:
+ case BufferFormat::YUV_420_BIPLANAR:
return GL_RED;
case BufferFormat::BGRA_8888:
return GL_RGBA;
@@ -82,6 +84,7 @@ GLenum TextureFormat(BufferFormat format) {
GLenum DataFormat(BufferFormat format) {
switch (format) {
case BufferFormat::R_8:
+ case BufferFormat::YUV_420_BIPLANAR:
return GL_RED;
case BufferFormat::BGRA_8888:
return GL_BGRA;
@@ -108,6 +111,7 @@ GLenum DataFormat(BufferFormat format) {
GLenum DataType(BufferFormat format) {
switch (format) {
case BufferFormat::R_8:
+ case BufferFormat::YUV_420_BIPLANAR:
return GL_UNSIGNED_BYTE;
case BufferFormat::BGRA_8888:
return GL_UNSIGNED_INT_8_8_8_8_REV;
« no previous file with comments | « ui/gfx/buffer_types.h ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698