| 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 ed747bea5defdced313341d23e365aaf386def01..4109b4ce5301a6bcfa0e568a52c5051cc271f6a7 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
| @@ -793,10 +793,11 @@ protected:
|
| void texImageImpl(TexImageFunctionID, GLenum target, GLint level, GLint internalformat, GLint xoffset, GLint yoffset, GLint zoffset,
|
| GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool flipY, bool premultiplyAlpha);
|
|
|
| - // 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*);
|
| - virtual 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, CanvasImageSource*);
|
| + virtual bool canUseTexImageByGPU(TexImageFunctionID, GLint internalformat, GLenum type);
|
|
|
| virtual WebGLImageConversion::PixelStoreParams getPackPixelStoreParams();
|
| virtual WebGLImageConversion::PixelStoreParams getUnpackPixelStoreParams(TexImageDimension);
|
| @@ -1105,6 +1106,8 @@ protected:
|
| private:
|
| WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, std::unique_ptr<WebGraphicsContext3DProvider>, const WebGLContextAttributes&);
|
| static std::unique_ptr<WebGraphicsContext3DProvider> createContextProviderInternal(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned);
|
| + void texImageCanvasByGPU(HTMLCanvasElement*, GLuint, GLenum, GLenum, GLint);
|
| + void texImageBitmapByGPU(ImageBitmap*, GLuint, GLenum, GLenum, GLint, bool);
|
| };
|
|
|
| DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, context->is3d(), context.is3d());
|
|
|