| Index: cc/platform_color.h
|
| diff --git a/cc/platform_color.h b/cc/platform_color.h
|
| index 61ffd31bd49c71a28a62dbb7893b5a8befcdb781..b7156b6c83d03d552a0bdb7708bcb26559cd70eb 100644
|
| --- a/cc/platform_color.h
|
| +++ b/cc/platform_color.h
|
| @@ -5,8 +5,8 @@
|
| #ifndef PlatformColor_h
|
| #define PlatformColor_h
|
|
|
| -#include "Extensions3D.h"
|
| -#include "GraphicsContext3D.h"
|
| +#include "third_party/khronos/GLES2/gl2ext.h"
|
| +#include "third_party/khronos/GLES2/gl2.h"
|
| #include "SkTypes.h"
|
| #include <public/WebGraphicsContext3D.h>
|
|
|
| @@ -14,21 +14,23 @@ namespace cc {
|
|
|
| class PlatformColor {
|
| public:
|
| - static GraphicsContext3D::SourceDataFormat format()
|
| + enum SourceDataFormat { SourceFormatRGBA8, SourceFormatBGRA8 };
|
| +
|
| + static SourceDataFormat format()
|
| {
|
| - return SK_B32_SHIFT ? GraphicsContext3D::SourceFormatRGBA8 : GraphicsContext3D::SourceFormatBGRA8;
|
| + return SK_B32_SHIFT ? SourceFormatRGBA8 : SourceFormatBGRA8;
|
| }
|
|
|
| // Returns the most efficient texture format for this platform.
|
| - static GC3Denum bestTextureFormat(WebKit::WebGraphicsContext3D* context, bool supportsBGRA8888)
|
| + static GLenum bestTextureFormat(WebKit::WebGraphicsContext3D* context, bool supportsBGRA8888)
|
| {
|
| - GC3Denum textureFormat = GraphicsContext3D::RGBA;
|
| + GLenum textureFormat = GL_RGBA;
|
| switch (format()) {
|
| - case GraphicsContext3D::SourceFormatRGBA8:
|
| + case SourceFormatRGBA8:
|
| break;
|
| - case GraphicsContext3D::SourceFormatBGRA8:
|
| + case SourceFormatBGRA8:
|
| if (supportsBGRA8888)
|
| - textureFormat = Extensions3D::BGRA_EXT;
|
| + textureFormat = GL_BGRA_EXT;
|
| break;
|
| default:
|
| ASSERT_NOT_REACHED();
|
| @@ -39,13 +41,13 @@ public:
|
|
|
| // Return true if the given texture format has the same component order
|
| // as the color on this platform.
|
| - static bool sameComponentOrder(GC3Denum textureFormat)
|
| + static bool sameComponentOrder(GLenum textureFormat)
|
| {
|
| switch (format()) {
|
| - case GraphicsContext3D::SourceFormatRGBA8:
|
| - return textureFormat == GraphicsContext3D::RGBA;
|
| - case GraphicsContext3D::SourceFormatBGRA8:
|
| - return textureFormat == Extensions3D::BGRA_EXT;
|
| + case SourceFormatRGBA8:
|
| + return textureFormat == GL_RGBA;
|
| + case SourceFormatBGRA8:
|
| + return textureFormat == GL_BGRA_EXT;
|
| default:
|
| ASSERT_NOT_REACHED();
|
| return false;
|
|
|