void WebGLContext::BufferSubData(GLenum target, WebGLsizeiptr dstByteOffset, const dom::ArrayBuffer& src) { const FuncScope funcScope(*this, "bufferSubData"); if (IsContextLost()) return; src.ComputeLengthAndData(); BufferSubDataImpl(target, dstByteOffset, src.LengthAllowShared(), src.DataAllowShared()); }
void WebGLContext::BufferSubData(GLenum target, WebGLsizeiptr dstByteOffset, const dom::ArrayBufferView& src, GLuint srcElemOffset, GLuint srcElemCountOverride) { const FuncScope funcScope(*this, "bufferSubData"); if (IsContextLost()) return; uint8_t* bytes; size_t byteLen; if (!ValidateArrayBufferView(src, srcElemOffset, srcElemCountOverride, LOCAL_GL_INVALID_VALUE, &bytes, &byteLen)) { return; } BufferSubDataImpl(target, dstByteOffset, byteLen, bytes); }
void WebGLContext::BufferSubData(GLenum target, WebGLsizeiptr dstByteOffset, const dom::ArrayBufferView& src, GLuint srcElemOffset, GLuint srcElemCountOverride) { const char funcName[] = "bufferSubData"; if (IsContextLost()) return; uint8_t* bytes; size_t byteLen; if (!ValidateArrayBufferView(funcName, src, srcElemOffset, srcElemCountOverride, &bytes, &byteLen)) { return; } BufferSubDataImpl(target, dstByteOffset, byteLen, bytes); }