summaryrefslogtreecommitdiffstats
path: root/dom/canvas/HostWebGLContext.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/canvas/HostWebGLContext.h
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/canvas/HostWebGLContext.h')
-rw-r--r--dom/canvas/HostWebGLContext.h34
1 files changed, 17 insertions, 17 deletions
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<const uint8_t>& 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<const uint8_t>& 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<const GLenum>& attachments) const {
- GetWebGL2Context()->InvalidateFramebuffer(target, MakeRange(attachments));
+ const Span<const GLenum>& attachments) const {
+ GetWebGL2Context()->InvalidateFramebuffer(target, attachments);
}
void InvalidateSubFramebuffer(GLenum target,
- const RawBuffer<const GLenum>& attachments,
- GLint x, GLint y, GLsizei width,
- GLsizei height) const {
- GetWebGL2Context()->InvalidateSubFramebuffer(target, MakeRange(attachments),
- x, y, width, height);
+ const Span<const GLenum>& 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<const uint8_t>& src,
+ const uint32_t pboImageSize,
const Maybe<uint64_t>& 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<webgl::UniformDataVal>& data) const {
- mContext->UniformData(loc, transpose, data.Data());
+ const Span<const webgl::UniformDataVal>& data) const {
+ mContext->UniformData(loc, transpose, data);
}
void VertexAttrib4T(GLuint index, const webgl::TypedQuad& data) const {