diff options
Diffstat (limited to 'dom/canvas/ClientWebGLContext.cpp')
-rw-r--r-- | dom/canvas/ClientWebGLContext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp index c32c4813ca..a66307b9b7 100644 --- a/dom/canvas/ClientWebGLContext.cpp +++ b/dom/canvas/ClientWebGLContext.cpp @@ -3393,9 +3393,7 @@ void ClientWebGLContext::BufferData(GLenum target, WebGLsizeiptr rawSize, EnqueueError(LOCAL_GL_OUT_OF_MEMORY, "`size` too large for platform."); return; } - - const auto data = RawBuffer<>{*size}; - Run<RPROC(BufferData)>(target, data, usage); + Run<RPROC(BufferData_SizeOnly)>(target, *size, usage); } void ClientWebGLContext::BufferData( @@ -3429,9 +3427,11 @@ void ClientWebGLContext::RawBufferData(GLenum target, const uint8_t* srcBytes, size_t srcLen, GLenum usage) { const FuncScope funcScope(*this, "bufferData"); - const auto srcBuffer = - srcBytes ? RawBuffer<>({srcBytes, srcLen}) : RawBuffer<>(srcLen); - Run<RPROC(BufferData)>(target, srcBuffer, usage); + if (srcBytes) { + Run<RPROC(BufferData)>(target, RawBuffer<>({srcBytes, srcLen}), usage); + } else { + Run<RPROC(BufferData_SizeOnly)>(target, srcLen, usage); + } } //// |