| Index: Source/platform/graphics/gpu/WebGLImageConversion.h
|
| diff --git a/Source/platform/graphics/gpu/WebGLImageConversion.h b/Source/platform/graphics/gpu/WebGLImageConversion.h
|
| index 66098aea6400de59515e460fcd55d802774a27da..f07a3d44c679fa192e95691fb77c45a9bb2e07f0 100644
|
| --- a/Source/platform/graphics/gpu/WebGLImageConversion.h
|
| +++ b/Source/platform/graphics/gpu/WebGLImageConversion.h
|
| @@ -9,6 +9,7 @@
|
| #include "platform/graphics/Image.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| +#include "third_party/khronos/GLES3/gl3.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "wtf/RefPtr.h"
|
|
|
| @@ -23,11 +24,23 @@ public:
|
| // reduce the amount of temporary allocations during texture
|
| // uploading. This enum must be public because it is accessed
|
| // by non-member functions.
|
| + // "_S" postfix indicates signed type.
|
| enum DataFormat {
|
| DataFormatRGBA8 = 0,
|
| + DataFormatRGBA8_S,
|
| + DataFormatRGBA16,
|
| + DataFormatRGBA16_S,
|
| + DataFormatRGBA32,
|
| + DataFormatRGBA32_S,
|
| DataFormatRGBA16F,
|
| DataFormatRGBA32F,
|
| + DataFormatRGBA2_10_10_10,
|
| DataFormatRGB8,
|
| + DataFormatRGB8_S,
|
| + DataFormatRGB16,
|
| + DataFormatRGB16_S,
|
| + DataFormatRGB32,
|
| + DataFormatRGB32_S,
|
| DataFormatRGB16F,
|
| DataFormatRGB32F,
|
| DataFormatBGR8,
|
| @@ -37,7 +50,21 @@ public:
|
| DataFormatRGBA5551,
|
| DataFormatRGBA4444,
|
| DataFormatRGB565,
|
| + DataFormatRGB10F11F11F,
|
| + DataFormatRG8,
|
| + DataFormatRG8_S,
|
| + DataFormatRG16,
|
| + DataFormatRG16_S,
|
| + DataFormatRG32,
|
| + DataFormatRG32_S,
|
| + DataFormatRG16F,
|
| + DataFormatRG32F,
|
| DataFormatR8,
|
| + DataFormatR8_S,
|
| + DataFormatR16,
|
| + DataFormatR16_S,
|
| + DataFormatR32,
|
| + DataFormatR32_S,
|
| DataFormatR16F,
|
| DataFormatR32F,
|
| DataFormatRA8,
|
| @@ -47,6 +74,10 @@ public:
|
| DataFormatA8,
|
| DataFormatA16F,
|
| DataFormatA32F,
|
| + DataFormatD16,
|
| + DataFormatD32,
|
| + DataFormatD32F,
|
| + DataFormatDS24_8,
|
| DataFormatNumFormats
|
| };
|
|
|
| @@ -57,8 +88,10 @@ public:
|
| ChannelAlpha = 8,
|
| ChannelDepth = 16,
|
| ChannelStencil = 32,
|
| + ChannelRG = ChannelRed | ChannelGreen,
|
| ChannelRGB = ChannelRed | ChannelGreen | ChannelBlue,
|
| ChannelRGBA = ChannelRGB | ChannelAlpha,
|
| + ChannelDepthStencil = ChannelDepth | ChannelStencil,
|
| };
|
|
|
| // Possible alpha operations that may need to occur during
|
| @@ -129,7 +162,7 @@ public:
|
| return SrcFormat == DataFormatBGRA8 || SrcFormat == DataFormatRGBA8;
|
| }
|
|
|
| - static unsigned getClearBitsByFormat(GLenum);
|
| + // The input can be either format or internalformat.
|
| static unsigned getChannelBitsByFormat(GLenum);
|
|
|
| // The Following functions are implemented in GraphicsContext3DImagePacking.cpp
|
|
|