Index: cc/resources/resource_format.cc |
diff --git a/cc/resources/resource_format.cc b/cc/resources/resource_format.cc |
index c62ae934d728f5d749514164f5da80fc9094c4bd..84dce657bd1330b6af0f0092b940677adaf858dc 100644 |
--- a/cc/resources/resource_format.cc |
+++ b/cc/resources/resource_format.cc |
@@ -4,8 +4,7 @@ |
#include "cc/resources/resource_format.h" |
-#include "third_party/khronos/GLES2/gl2.h" |
-#include "third_party/khronos/GLES2/gl2ext.h" |
+#include "ui/gl/gl_bindings.h" |
namespace cc { |
@@ -87,19 +86,26 @@ GLenum GLInternalFormat(ResourceFormat format) { |
return GLDataFormat(format); |
} |
+GLenum GLImageFormat(ResourceFormat format) { |
+ if (format == RED_8) |
+ return GL_R8_EXT; |
reveman
2015/11/05 13:46:01
Can we have normal textures use GL_R8_EXT as well?
ccameron
2015/11/05 19:09:20
That was the first thing that I tried, but GL_R8_E
|
+ return GLInternalFormat(format); |
+} |
+ |
gfx::BufferFormat BufferFormat(ResourceFormat format) { |
switch (format) { |
- case RGBA_8888: |
- return gfx::BufferFormat::RGBA_8888; |
case BGRA_8888: |
return gfx::BufferFormat::BGRA_8888; |
+ case RED_8: |
+ return gfx::BufferFormat::R_8; |
case RGBA_4444: |
return gfx::BufferFormat::RGBA_4444; |
+ case RGBA_8888: |
+ return gfx::BufferFormat::RGBA_8888; |
case ALPHA_8: |
case LUMINANCE_8: |
case RGB_565: |
case ETC1: |
- case RED_8: |
break; |
} |
NOTREACHED(); |