| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| index f6738b88b58248e6ae101cf6b1e65dac499bdb38..18b094f64ba8a2521eae90b1e7df9dd0bc64399d 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| @@ -789,10 +789,11 @@ protected:
|
| Tex2D,
|
| Tex3D
|
| };
|
| - // Copy from the canvas element directly to the texture via the GPU, without a read-back to system memory.
|
| - void texImageCanvasByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GLint level,
|
| - GLint internalformat, GLenum type, GLint xoffset, GLint yoffset, GLint zoffset, HTMLCanvasElement*);
|
| - bool canUseTexImageCanvasByGPU(GLint internalformat, GLenum type);
|
| + // Copy from the source directly to the texture via the gpu, without a read-back to system memory.
|
| + // Souce could be canvas or imageBitmap.
|
| + void texImageByGPU(TexImageByGPUType, WebGLTexture*, GLenum target, GLint level, GLint internalformat,
|
| + GLenum type, GLint xoffset, GLint yoffset, GLint zoffset, HTMLCanvasElement*, ImageBitmap*);
|
| + bool canUseTexImageByGPU(GLint internalformat, GLenum type);
|
|
|
| virtual WebGLImageConversion::PixelStoreParams getPackPixelStoreParams();
|
| virtual WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(TexImageDimension);
|
| @@ -1091,6 +1092,8 @@ protected:
|
| private:
|
| WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&);
|
| static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInternal(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned);
|
| + void texImageCanvasByGPU(HTMLCanvasElement*, GLuint, GLenum, GLenum, GLint);
|
| + void texImageBitmapByGPU(ImageBitmap*, GLuint, GLenum, GLenum, GLint);
|
| };
|
|
|
| DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, context->is3d(), context.is3d());
|
|
|