summaryrefslogtreecommitdiff
path: root/chromium/cc/resources/resource_provider.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/cc/resources/resource_provider.h')
-rw-r--r--chromium/cc/resources/resource_provider.h35
1 files changed, 3 insertions, 32 deletions
diff --git a/chromium/cc/resources/resource_provider.h b/chromium/cc/resources/resource_provider.h
index 6e5c61a2bfa..2478661d62c 100644
--- a/chromium/cc/resources/resource_provider.h
+++ b/chromium/cc/resources/resource_provider.h
@@ -25,8 +25,6 @@
#include "cc/resources/single_release_callback.h"
#include "cc/resources/texture_mailbox.h"
#include "cc/resources/transferable_resource.h"
-#include "third_party/khronos/GLES2/gl2.h"
-#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/size.h"
@@ -36,6 +34,9 @@ namespace gles {
class GLES2Interface;
}
}
+// A correct fix would be not to use GL types in this interal API file.
+typedef unsigned int GLenum;
+typedef int GLint;
namespace gfx {
class Rect;
@@ -525,36 +526,6 @@ inline unsigned BitsPerPixel(ResourceFormat format) {
return format_bits_per_pixel[format];
}
-inline GLenum GLDataType(ResourceFormat format) {
- DCHECK_LE(format, RESOURCE_FORMAT_MAX);
- static const unsigned format_gl_data_type[RESOURCE_FORMAT_MAX + 1] = {
- GL_UNSIGNED_BYTE, // RGBA_8888
- GL_UNSIGNED_SHORT_4_4_4_4, // RGBA_4444
- GL_UNSIGNED_BYTE, // BGRA_8888
- GL_UNSIGNED_BYTE, // LUMINANCE_8
- GL_UNSIGNED_SHORT_5_6_5, // RGB_565,
- GL_UNSIGNED_BYTE // ETC1
- };
- return format_gl_data_type[format];
-}
-
-inline GLenum GLDataFormat(ResourceFormat format) {
- DCHECK_LE(format, RESOURCE_FORMAT_MAX);
- static const unsigned format_gl_data_format[RESOURCE_FORMAT_MAX + 1] = {
- GL_RGBA, // RGBA_8888
- GL_RGBA, // RGBA_4444
- GL_BGRA_EXT, // BGRA_8888
- GL_LUMINANCE, // LUMINANCE_8
- GL_RGB, // RGB_565
- GL_ETC1_RGB8_OES // ETC1
- };
- return format_gl_data_format[format];
-}
-
-inline GLenum GLInternalFormat(ResourceFormat format) {
- return GLDataFormat(format);
-}
-
} // namespace cc
#endif // CC_RESOURCES_RESOURCE_PROVIDER_H_