| Index: Source/core/html/canvas/WebGLRenderingContextBase.h
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.h b/Source/core/html/canvas/WebGLRenderingContextBase.h
|
| index 1809238dc9a216ae4e7c43e360c7657a9e636f08..88fcb9e232db4ed620f5a87283ac447df073843d 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContextBase.h
|
| +++ b/Source/core/html/canvas/WebGLRenderingContextBase.h
|
| @@ -731,6 +731,14 @@ protected:
|
| void texSubImage2DBase(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels, ExceptionState&);
|
| void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool flipY, bool premultiplyAlpha, ExceptionState&);
|
|
|
| + enum TexImageFunctionType {
|
| + NotTexSubImage2D,
|
| + TexSubImage2D,
|
| + };
|
| + // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory.
|
| + void texImage2DCanvasByGPU(TexImageFunctionType, WebGLTexture*, GLenum target, GLint level,
|
| + GLenum internalformat, GLenum type, GLint xoffset, GLint yoffset, HTMLCanvasElement*);
|
| +
|
| void handleTextureCompleteness(const char*, bool);
|
| void createFallbackBlackTextures1x1();
|
|
|
| @@ -770,11 +778,6 @@ protected:
|
| // Generates GL error and returns false if not.
|
| bool validateValueFitNonNegInt32(const char* functionName, const char* paramName, long long value);
|
|
|
| - enum TexFuncValidationFunctionType {
|
| - NotTexSubImage2D,
|
| - TexSubImage2D,
|
| - };
|
| -
|
| enum TexFuncValidationSourceType {
|
| SourceArrayBufferView,
|
| SourceImageData,
|
| @@ -785,16 +788,16 @@ protected:
|
|
|
| // Helper function for tex{Sub}Image2D to check if the input format/type/level/target/width/height/border/xoffset/yoffset are valid.
|
| // Otherwise, it would return quickly without doing other work.
|
| - bool validateTexFunc(const char* functionName, TexFuncValidationFunctionType, TexFuncValidationSourceType, GLenum target, GLint level, GLenum internalformat, GLsizei width,
|
| + bool validateTexFunc(const char* functionName, TexImageFunctionType, TexFuncValidationSourceType, GLenum target, GLint level, GLenum internalformat, GLsizei width,
|
| GLsizei height, GLint border, GLenum format, GLenum type, GLint xoffset, GLint yoffset);
|
|
|
| // Helper function to check input width and height for functions {copy, compressed}Tex{Sub}Image.
|
| // Generates GL error and returns false if width or height is invalid.
|
| - bool validateTexFuncDimensions(const char* functionName, TexFuncValidationFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height);
|
| + bool validateTexFuncDimensions(const char* functionName, TexImageFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height);
|
|
|
| // Helper function to check input parameters for functions {copy}Tex{Sub}Image.
|
| // Generates GL error and returns false if parameters are invalid.
|
| - bool validateTexFuncParameters(const char* functionName, TexFuncValidationFunctionType, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type);
|
| + bool validateTexFuncParameters(const char* functionName, TexImageFunctionType, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type);
|
|
|
| enum NullDisposition {
|
| NullAllowed,
|
| @@ -821,7 +824,7 @@ protected:
|
|
|
| // Helper function to validate compressed texture dimensions are valid for
|
| // the given format.
|
| - bool validateCompressedTexDimensions(const char* functionName, TexFuncValidationFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height, GLenum format);
|
| + bool validateCompressedTexDimensions(const char* functionName, TexImageFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height, GLenum format);
|
|
|
| // Helper function to validate compressed texture dimensions are valid for
|
| // the given format.
|
|
|