From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- dom/canvas/HostWebGLContext.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'dom/canvas/HostWebGLContext.h') diff --git a/dom/canvas/HostWebGLContext.h b/dom/canvas/HostWebGLContext.h index c508a164c8..cc385bc26a 100644 --- a/dom/canvas/HostWebGLContext.h +++ b/dom/canvas/HostWebGLContext.h @@ -482,8 +482,9 @@ class HostWebGLContext final : public SupportsWeakPtr { return GetWebGL2Context()->GetBufferSubData(target, srcByteOffset, dest); } - void BufferData(GLenum target, const RawBuffer<>& srcData, GLenum usage) const { - mContext->BufferData(target, srcData.size(), srcData.begin(), usage); + void BufferData(GLenum target, const Span& srcData, + GLenum usage) const { + mContext->BufferData(target, srcData.size(), srcData.data(), usage); } void BufferData_SizeOnly(GLenum target, size_t byteSize, GLenum usage) const { @@ -491,11 +492,10 @@ class HostWebGLContext final : public SupportsWeakPtr { } void BufferSubData(GLenum target, uint64_t dstByteOffset, - const RawBuffer<>& srcData, + const Span& srcData, bool unsynchronized = false) const { - const auto& range = srcData.Data(); - mContext->BufferSubData(target, dstByteOffset, range.length(), - range.begin().get(), unsynchronized); + mContext->BufferSubData(target, dstByteOffset, srcData.size(), + srcData.data(), unsynchronized); } // -------------------------- Framebuffer Objects -------------------------- @@ -507,16 +507,15 @@ class HostWebGLContext final : public SupportsWeakPtr { } void InvalidateFramebuffer(GLenum target, - const RawBuffer& attachments) const { - GetWebGL2Context()->InvalidateFramebuffer(target, MakeRange(attachments)); + const Span& attachments) const { + GetWebGL2Context()->InvalidateFramebuffer(target, attachments); } void InvalidateSubFramebuffer(GLenum target, - const RawBuffer& attachments, - GLint x, GLint y, GLsizei width, - GLsizei height) const { - GetWebGL2Context()->InvalidateSubFramebuffer(target, MakeRange(attachments), - x, y, width, height); + const Span& attachments, GLint x, + GLint y, GLsizei width, GLsizei height) const { + GetWebGL2Context()->InvalidateSubFramebuffer(target, attachments, x, y, + width, height); } void ReadBuffer(GLenum mode) const { GetWebGL2Context()->ReadBuffer(mode); } @@ -554,10 +553,11 @@ class HostWebGLContext final : public SupportsWeakPtr { // CompressedTexSubImage if `sub` void CompressedTexImage(bool sub, GLenum imageTarget, uint32_t level, GLenum format, const uvec3& offset, const uvec3& size, - const RawBuffer<>& src, const uint32_t pboImageSize, + const Span& src, + const uint32_t pboImageSize, const Maybe& pboOffset) const { mContext->CompressedTexImage(sub, imageTarget, level, format, offset, size, - MakeRange(src), pboImageSize, pboOffset); + src, pboImageSize, pboOffset); } // CopyTexSubImage if `!respecFormat` @@ -603,8 +603,8 @@ class HostWebGLContext final : public SupportsWeakPtr { // ------------------------ Uniforms and attributes ------------------------ void UniformData(uint32_t loc, bool transpose, - const RawBuffer& data) const { - mContext->UniformData(loc, transpose, data.Data()); + const Span& data) const { + mContext->UniformData(loc, transpose, data); } void VertexAttrib4T(GLuint index, const webgl::TypedQuad& data) const { -- cgit v1.2.3