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(); |