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

Unified Diff: cc/resources/resource_format.cc

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 8 bpp support added. R200 camera supported. Created 4 years, 5 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: cc/resources/resource_format.cc
diff --git a/cc/resources/resource_format.cc b/cc/resources/resource_format.cc
index 2eae8307355c7db49bb63febaf2084b81fb62f89..20791a6ac5039f579166fd25736474849da29a64 100644
--- a/cc/resources/resource_format.cc
+++ b/cc/resources/resource_format.cc
@@ -16,6 +16,7 @@ int BitsPerPixel(ResourceFormat format) {
return 32;
case RGBA_4444:
case RGB_565:
+ case RG_88:
case LUMINANCE_F16:
return 16;
case ALPHA_8:
@@ -41,6 +42,7 @@ GLenum GLDataType(ResourceFormat format) {
GL_UNSIGNED_BYTE, // ETC1
GL_UNSIGNED_BYTE, // RED_8
GL_HALF_FLOAT_OES, // LUMINANCE_F16
+ GL_UNSIGNED_BYTE, // RG_88
};
static_assert(arraysize(format_gl_data_type) == (RESOURCE_FORMAT_MAX + 1),
"format_gl_data_type does not handle all cases.");
@@ -60,6 +62,7 @@ GLenum GLDataFormat(ResourceFormat format) {
GL_ETC1_RGB8_OES, // ETC1
GL_RED_EXT, // RED_8
GL_LUMINANCE, // LUMINANCE_F16
+ GL_RG_EXT, // RG_88
};
static_assert(arraysize(format_gl_data_format) == (RESOURCE_FORMAT_MAX + 1),
"format_gl_data_format does not handle all cases.");
@@ -87,6 +90,7 @@ gfx::BufferFormat BufferFormat(ResourceFormat format) {
case LUMINANCE_8:
case RGB_565:
case LUMINANCE_F16:
+ case RG_88:
break;
}
NOTREACHED();
@@ -109,6 +113,7 @@ bool DoesResourceFormatSupportAlpha(ResourceFormat format) {
case ETC1:
case RED_8:
case LUMINANCE_F16:
+ case RG_88:
return false;
}
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698