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/WebGL2ContextFramebuffers.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dom/canvas/WebGL2ContextFramebuffers.cpp') diff --git a/dom/canvas/WebGL2ContextFramebuffers.cpp b/dom/canvas/WebGL2ContextFramebuffers.cpp index 7056c83d03..ab9e848f62 100644 --- a/dom/canvas/WebGL2ContextFramebuffers.cpp +++ b/dom/canvas/WebGL2ContextFramebuffers.cpp @@ -106,7 +106,7 @@ static bool ValidateFramebufferAttachmentEnum(WebGLContext* webgl, } bool WebGLContext::ValidateInvalidateFramebuffer( - GLenum target, const Range& attachments, + GLenum target, const Span& attachments, std::vector* const scopedVector, GLsizei* const out_glNumAttachments, const GLenum** const out_glAttachments) { @@ -139,8 +139,8 @@ bool WebGLContext::ValidateInvalidateFramebuffer( } DoBindFB(fb, target); - *out_glNumAttachments = attachments.length(); - *out_glAttachments = attachments.begin().get(); + *out_glNumAttachments = AutoAssertCast(attachments.size()); + *out_glAttachments = attachments.data(); if (fb) { for (const auto& attachment : attachments) { @@ -153,7 +153,7 @@ bool WebGLContext::ValidateInvalidateFramebuffer( if (!isDefaultFB) { MOZ_ASSERT(scopedVector->empty()); - scopedVector->reserve(attachments.length()); + scopedVector->reserve(attachments.size()); for (const auto& attachment : attachments) { switch (attachment) { case LOCAL_GL_COLOR: @@ -172,7 +172,7 @@ bool WebGLContext::ValidateInvalidateFramebuffer( MOZ_CRASH(); } } - *out_glNumAttachments = scopedVector->size(); + *out_glNumAttachments = AutoAssertCast(scopedVector->size()); *out_glAttachments = scopedVector->data(); } } @@ -183,7 +183,7 @@ bool WebGLContext::ValidateInvalidateFramebuffer( } void WebGL2Context::InvalidateFramebuffer( - GLenum target, const Range& attachments) { + GLenum target, const Span& attachments) { const FuncScope funcScope(*this, "invalidateFramebuffer"); std::vector scopedVector; @@ -210,7 +210,7 @@ void WebGL2Context::InvalidateFramebuffer( } void WebGL2Context::InvalidateSubFramebuffer( - GLenum target, const Range& attachments, GLint x, GLint y, + GLenum target, const Span& attachments, GLint x, GLint y, GLsizei width, GLsizei height) { const FuncScope funcScope(*this, "invalidateSubFramebuffer"); -- cgit v1.2.3