Index: cc/resources/resource_format.cc |
diff --git a/cc/resources/resource_format.cc b/cc/resources/resource_format.cc |
index 9a47c7e380df9ccd09ad6a31542f4480a9c9b095..8b28eb3a5169506e5276ffe8e0c333613da2b88b 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."); |
@@ -90,6 +93,7 @@ GLenum GLCopyTextureInternalFormat(ResourceFormat format) { |
GL_RGB, // ETC1 |
GL_LUMINANCE, // 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."); |
@@ -112,6 +116,7 @@ gfx::BufferFormat BufferFormat(ResourceFormat format) { |
case LUMINANCE_8: |
case RGB_565: |
case LUMINANCE_F16: |
+ case RG_88: |
break; |
} |
NOTREACHED(); |
@@ -134,6 +139,7 @@ bool DoesResourceFormatSupportAlpha(ResourceFormat format) { |
case ETC1: |
case RED_8: |
case LUMINANCE_F16: |
+ case RG_88: |
return false; |
} |
NOTREACHED(); |