#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.h"
#include <memory>
#include "base/compiler_specific.h"
#include "base/containers/heap_array.h"
#include "base/numerics/checked_math.h"
#include "base/numerics/safe_conversions.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/public/platform/web_graphics_context_3d_provider.h"
#include "third_party/blink/renderer/bindings/modules/v8/webgl_any.h"
#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "third_party/blink/renderer/core/html/canvas/image_data.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
#include "third_party/blink/renderer/core/imagebitmap/image_bitmap.h"
#include "third_party/blink/renderer/modules/webgl/webgl_active_info.h"
#include "third_party/blink/renderer/modules/webgl/webgl_buffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_fence_sync.h"
#include "third_party/blink/renderer/modules/webgl/webgl_framebuffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_program.h"
#include "third_party/blink/renderer/modules/webgl/webgl_query.h"
#include "third_party/blink/renderer/modules/webgl/webgl_renderbuffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_sampler.h"
#include "third_party/blink/renderer/modules/webgl/webgl_sync.h"
#include "third_party/blink/renderer/modules/webgl/webgl_texture.h"
#include "third_party/blink/renderer/modules/webgl/webgl_transform_feedback.h"
#include "third_party/blink/renderer/modules/webgl/webgl_uniform_location.h"
#include "third_party/blink/renderer/modules/webgl/webgl_vertex_array_object.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#define POPULATE_TEX_IMAGE_2D_PARAMS(params, src_type) …
#define POPULATE_TEX_SUB_IMAGE_2D_PARAMS(params, src_type) …
#define POPULATE_TEX_IMAGE_3D_PARAMS(params, src_type) …
#define POPULATE_TEX_SUB_IMAGE_3D_PARAMS(params, src_type) …
namespace blink {
namespace {
const GLuint64 kMaxClientWaitTimeout = …;
bool ValidateSubSourceAndGetData(DOMArrayBufferView* view,
int64_t sub_offset,
int64_t sub_length,
void** out_base_address,
int64_t* out_byte_length) { … }
class PointableStringArray { … };
}
const GLenum kSupportedInternalFormatsStorage[] = …;
WebGL2RenderingContextBase::WebGL2RenderingContextBase(
CanvasRenderingContextHost* host,
std::unique_ptr<WebGraphicsContext3DProvider> context_provider,
const Platform::GraphicsInfo& graphics_info,
const CanvasContextCreationAttributesCore& requested_attributes,
Platform::ContextType context_type)
: … { … }
void WebGL2RenderingContextBase::DestroyContext() { … }
void WebGL2RenderingContextBase::InitializeNewContext() { … }
void WebGL2RenderingContextBase::bufferData(
GLenum target,
MaybeShared<DOMArrayBufferView> src_data,
GLenum usage,
int64_t src_offset,
GLuint length) { … }
void WebGL2RenderingContextBase::bufferData(GLenum target,
int64_t size,
GLenum usage) { … }
void WebGL2RenderingContextBase::bufferData(GLenum target,
DOMArrayBufferBase* data,
GLenum usage) { … }
void WebGL2RenderingContextBase::bufferData(
GLenum target,
MaybeShared<DOMArrayBufferView> data,
GLenum usage) { … }
void WebGL2RenderingContextBase::bufferSubData(
GLenum target,
int64_t dst_byte_offset,
MaybeShared<DOMArrayBufferView> src_data,
int64_t src_offset,
GLuint length) { … }
void WebGL2RenderingContextBase::bufferSubData(GLenum target,
int64_t offset,
base::span<const uint8_t> data) { … }
void WebGL2RenderingContextBase::copyBufferSubData(GLenum read_target,
GLenum write_target,
int64_t read_offset,
int64_t write_offset,
int64_t size) { … }
void WebGL2RenderingContextBase::getBufferSubData(
GLenum target,
int64_t src_byte_offset,
MaybeShared<DOMArrayBufferView> dst_data,
int64_t dst_offset,
GLuint length) { … }
void WebGL2RenderingContextBase::blitFramebuffer(GLint src_x0,
GLint src_y0,
GLint src_x1,
GLint src_y1,
GLint dst_x0,
GLint dst_y0,
GLint dst_x1,
GLint dst_y1,
GLbitfield mask,
GLenum filter) { … }
bool WebGL2RenderingContextBase::ValidateTexFuncLayer(const char* function_name,
GLenum tex_target,
GLint layer) { … }
void WebGL2RenderingContextBase::framebufferTextureLayer(GLenum target,
GLenum attachment,
WebGLTexture* texture,
GLint level,
GLint layer) { … }
ScriptValue WebGL2RenderingContextBase::getInternalformatParameter(
ScriptState* script_state,
GLenum target,
GLenum internalformat,
GLenum pname) { … }
void WebGL2RenderingContextBase::RecordInternalFormatParameter(
GLenum internalformat,
GLint* values,
GLint length) { … }
bool WebGL2RenderingContextBase::CheckAndTranslateAttachments(
const char* function_name,
GLenum target,
Vector<GLenum>& attachments) { … }
gfx::Rect WebGL2RenderingContextBase::GetTextureSourceSubRectangle(
GLsizei width,
GLsizei height) { … }
void WebGL2RenderingContextBase::invalidateFramebuffer(
GLenum target,
const Vector<GLenum>& attachments) { … }
void WebGL2RenderingContextBase::invalidateSubFramebuffer(
GLenum target,
const Vector<GLenum>& attachments,
GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
void WebGL2RenderingContextBase::readBuffer(GLenum mode) { … }
void WebGL2RenderingContextBase::pixelStorei(GLenum pname, GLint param) { … }
void WebGL2RenderingContextBase::readPixels(
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGL2RenderingContextBase::readPixels(
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels,
int64_t offset) { … }
void WebGL2RenderingContextBase::readPixels(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::RenderbufferStorageHelper(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
const char* function_name) { … }
void WebGL2RenderingContextBase::RenderbufferStorageImpl(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
const char* function_name) { … }
void WebGL2RenderingContextBase::renderbufferStorageMultisample(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height) { … }
void WebGL2RenderingContextBase::ResetUnpackParameters() { … }
void WebGL2RenderingContextBase::RestoreUnpackParameters() { … }
void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::texImage2D(
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> data) { … }
void WebGL2RenderingContextBase::texImage2D(
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> data,
int64_t src_offset) { … }
void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
CanvasRenderingContextHost* canvas,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
ImageData* image_data) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
ImageBitmap* image_bit_map,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGL2RenderingContextBase::texSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels,
int64_t src_offset) { … }
void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
CanvasRenderingContextHost* canvas,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texStorage2D(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height) { … }
void WebGL2RenderingContextBase::texStorage3D(GLenum target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth) { … }
void WebGL2RenderingContextBase::texImage3D(
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGL2RenderingContextBase::texImage3D(
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::texImage3D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::texImage3D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGL2RenderingContextBase::texImage3D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage3D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
CanvasRenderingContextHost* canvas,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage3D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage3D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texImage3D(GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage3D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::texSubImage3D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGL2RenderingContextBase::texSubImage3D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage3D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage3D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage3D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::texSubImage3D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGL2RenderingContextBase::copyTexSubImage3D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
void WebGL2RenderingContextBase::compressedTexImage2D(
GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLint border,
MaybeShared<DOMArrayBufferView> data) { … }
void WebGL2RenderingContextBase::compressedTexImage2D(
GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLint border,
MaybeShared<DOMArrayBufferView> data,
GLuint src_offset,
GLuint src_length_override) { … }
void WebGL2RenderingContextBase::compressedTexImage2D(GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLsizei image_size,
int64_t offset) { … }
void WebGL2RenderingContextBase::compressedTexSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
MaybeShared<DOMArrayBufferView> data) { … }
void WebGL2RenderingContextBase::compressedTexSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
MaybeShared<DOMArrayBufferView> data,
GLuint src_offset,
GLuint src_length_override) { … }
void WebGL2RenderingContextBase::compressedTexSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLsizei image_size,
int64_t offset) { … }
void WebGL2RenderingContextBase::compressedTexImage3D(
GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
MaybeShared<DOMArrayBufferView> data,
GLuint src_offset,
GLuint src_length_override) { … }
void WebGL2RenderingContextBase::compressedTexImage3D(GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLsizei image_size,
int64_t offset) { … }
void WebGL2RenderingContextBase::compressedTexSubImage3D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
MaybeShared<DOMArrayBufferView> data,
GLuint src_offset,
GLuint src_length_override) { … }
void WebGL2RenderingContextBase::compressedTexSubImage3D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenum format,
GLsizei image_size,
int64_t offset) { … }
GLint WebGL2RenderingContextBase::getFragDataLocation(WebGLProgram* program,
const String& name) { … }
void WebGL2RenderingContextBase::uniform1ui(
const WebGLUniformLocation* location,
GLuint v0) { … }
void WebGL2RenderingContextBase::uniform2ui(
const WebGLUniformLocation* location,
GLuint v0,
GLuint v1) { … }
void WebGL2RenderingContextBase::uniform3ui(
const WebGLUniformLocation* location,
GLuint v0,
GLuint v1,
GLuint v2) { … }
void WebGL2RenderingContextBase::uniform4ui(
const WebGLUniformLocation* location,
GLuint v0,
GLuint v1,
GLuint v2,
GLuint v3) { … }
void WebGL2RenderingContextBase::uniform1fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform2fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform3fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform4fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform1iv(
const WebGLUniformLocation* location,
base::span<const GLint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform2iv(
const WebGLUniformLocation* location,
base::span<const GLint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform3iv(
const WebGLUniformLocation* location,
base::span<const GLint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform4iv(
const WebGLUniformLocation* location,
base::span<const GLint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform1uiv(
const WebGLUniformLocation* location,
base::span<const GLuint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform2uiv(
const WebGLUniformLocation* location,
base::span<const GLuint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform3uiv(
const WebGLUniformLocation* location,
base::span<const GLuint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform4uiv(
const WebGLUniformLocation* location,
base::span<const GLuint> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix3fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix4fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix2x3fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix3x2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix2x4fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix4x2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix3x4fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniformMatrix4x3fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> value,
GLuint src_offset,
GLuint src_length) { … }
void WebGL2RenderingContextBase::uniform1fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniform2fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniform3fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniform4fv(
const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniform1iv(
const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGL2RenderingContextBase::uniform2iv(
const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGL2RenderingContextBase::uniform3iv(
const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGL2RenderingContextBase::uniform4iv(
const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGL2RenderingContextBase::uniformMatrix2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniformMatrix3fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::uniformMatrix4fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGL2RenderingContextBase::vertexAttribI4i(GLuint index,
GLint x,
GLint y,
GLint z,
GLint w) { … }
void WebGL2RenderingContextBase::vertexAttribI4iv(GLuint index,
base::span<const GLint> v) { … }
void WebGL2RenderingContextBase::vertexAttribI4ui(GLuint index,
GLuint x,
GLuint y,
GLuint z,
GLuint w) { … }
void WebGL2RenderingContextBase::vertexAttribI4uiv(GLuint index,
base::span<const GLuint> v) { … }
void WebGL2RenderingContextBase::vertexAttribIPointer(GLuint index,
GLint size,
GLenum type,
GLsizei stride,
int64_t offset) { … }
void WebGL2RenderingContextBase::vertexAttribDivisor(GLuint index,
GLuint divisor) { … }
void WebGL2RenderingContextBase::drawArraysInstanced(GLenum mode,
GLint first,
GLsizei count,
GLsizei instance_count) { … }
void WebGL2RenderingContextBase::drawElementsInstanced(GLenum mode,
GLsizei count,
GLenum type,
int64_t offset,
GLsizei instance_count) { … }
void WebGL2RenderingContextBase::drawRangeElements(GLenum mode,
GLuint start,
GLuint end,
GLsizei count,
GLenum type,
int64_t offset) { … }
void WebGL2RenderingContextBase::drawBuffers(const Vector<GLenum>& buffers) { … }
bool WebGL2RenderingContextBase::ValidateClearBuffer(const char* function_name,
GLenum buffer,
size_t size,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::GetCurrentUnpackState(TexImageParams& params) { … }
WebGLTexture* WebGL2RenderingContextBase::ValidateTexImageBinding(
const TexImageParams& params) { … }
void WebGL2RenderingContextBase::clearBufferiv(GLenum buffer,
GLint drawbuffer,
base::span<const GLint> value,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::clearBufferuiv(GLenum buffer,
GLint drawbuffer,
base::span<const GLuint> value,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::clearBufferfv(GLenum buffer,
GLint drawbuffer,
base::span<const GLfloat> value,
GLuint src_offset) { … }
void WebGL2RenderingContextBase::clearBufferfi(GLenum buffer,
GLint drawbuffer,
GLfloat depth,
GLint stencil) { … }
WebGLQuery* WebGL2RenderingContextBase::createQuery() { … }
void WebGL2RenderingContextBase::deleteQuery(WebGLQuery* query) { … }
GLboolean WebGL2RenderingContextBase::isQuery(WebGLQuery* query) { … }
void WebGL2RenderingContextBase::beginQuery(GLenum target, WebGLQuery* query) { … }
void WebGL2RenderingContextBase::endQuery(GLenum target) { … }
ScriptValue WebGL2RenderingContextBase::getQuery(ScriptState* script_state,
GLenum target,
GLenum pname) { … }
ScriptValue WebGL2RenderingContextBase::getQueryParameter(
ScriptState* script_state,
WebGLQuery* query,
GLenum pname) { … }
WebGLSampler* WebGL2RenderingContextBase::createSampler() { … }
void WebGL2RenderingContextBase::deleteSampler(WebGLSampler* sampler) { … }
GLboolean WebGL2RenderingContextBase::isSampler(WebGLSampler* sampler) { … }
void WebGL2RenderingContextBase::bindSampler(GLuint unit,
WebGLSampler* sampler) { … }
void WebGL2RenderingContextBase::SamplerParameter(WebGLSampler* sampler,
GLenum pname,
GLfloat paramf,
GLint parami,
bool is_float) { … }
void WebGL2RenderingContextBase::samplerParameteri(WebGLSampler* sampler,
GLenum pname,
GLint param) { … }
void WebGL2RenderingContextBase::samplerParameterf(WebGLSampler* sampler,
GLenum pname,
GLfloat param) { … }
ScriptValue WebGL2RenderingContextBase::getSamplerParameter(
ScriptState* script_state,
WebGLSampler* sampler,
GLenum pname) { … }
WebGLSync* WebGL2RenderingContextBase::fenceSync(GLenum condition,
GLbitfield flags) { … }
GLboolean WebGL2RenderingContextBase::isSync(WebGLSync* sync) { … }
void WebGL2RenderingContextBase::deleteSync(WebGLSync* sync) { … }
GLenum WebGL2RenderingContextBase::clientWaitSync(WebGLSync* sync,
GLbitfield flags,
GLuint64 timeout) { … }
void WebGL2RenderingContextBase::waitSync(WebGLSync* sync,
GLbitfield flags,
GLint64 timeout) { … }
ScriptValue WebGL2RenderingContextBase::getSyncParameter(
ScriptState* script_state,
WebGLSync* sync,
GLenum pname) { … }
WebGLTransformFeedback* WebGL2RenderingContextBase::createTransformFeedback() { … }
void WebGL2RenderingContextBase::deleteTransformFeedback(
WebGLTransformFeedback* feedback) { … }
GLboolean WebGL2RenderingContextBase::isTransformFeedback(
WebGLTransformFeedback* feedback) { … }
void WebGL2RenderingContextBase::bindTransformFeedback(
GLenum target,
WebGLTransformFeedback* feedback) { … }
void WebGL2RenderingContextBase::beginTransformFeedback(GLenum primitive_mode) { … }
void WebGL2RenderingContextBase::endTransformFeedback() { … }
void WebGL2RenderingContextBase::transformFeedbackVaryings(
WebGLProgram* program,
const Vector<String>& varyings,
GLenum buffer_mode) { … }
WebGLActiveInfo* WebGL2RenderingContextBase::getTransformFeedbackVarying(
WebGLProgram* program,
GLuint index) { … }
void WebGL2RenderingContextBase::pauseTransformFeedback() { … }
void WebGL2RenderingContextBase::resumeTransformFeedback() { … }
bool WebGL2RenderingContextBase::ValidateTransformFeedbackPrimitiveMode(
const char* function_name,
GLenum primitive_mode) { … }
void WebGL2RenderingContextBase::OnBeforeDrawCall(
CanvasPerformanceMonitor::DrawType draw_type) { … }
void WebGL2RenderingContextBase::bindBufferBase(GLenum target,
GLuint index,
WebGLBuffer* buffer) { … }
void WebGL2RenderingContextBase::bindBufferRange(GLenum target,
GLuint index,
WebGLBuffer* buffer,
int64_t offset,
int64_t size) { … }
ScriptValue WebGL2RenderingContextBase::getIndexedParameter(
ScriptState* script_state,
GLenum target,
GLuint index) { … }
std::optional<Vector<GLuint>> WebGL2RenderingContextBase::getUniformIndices(
WebGLProgram* program,
const Vector<String>& uniform_names) { … }
ScriptValue WebGL2RenderingContextBase::getActiveUniforms(
ScriptState* script_state,
WebGLProgram* program,
const Vector<GLuint>& uniform_indices,
GLenum pname) { … }
GLuint WebGL2RenderingContextBase::getUniformBlockIndex(
WebGLProgram* program,
const String& uniform_block_name) { … }
bool WebGL2RenderingContextBase::ValidateUniformBlockIndex(
const char* function_name,
WebGLProgram* program,
GLuint block_index) { … }
ScriptValue WebGL2RenderingContextBase::getActiveUniformBlockParameter(
ScriptState* script_state,
WebGLProgram* program,
GLuint uniform_block_index,
GLenum pname) { … }
String WebGL2RenderingContextBase::getActiveUniformBlockName(
WebGLProgram* program,
GLuint uniform_block_index) { … }
void WebGL2RenderingContextBase::uniformBlockBinding(
WebGLProgram* program,
GLuint uniform_block_index,
GLuint uniform_block_binding) { … }
WebGLVertexArrayObject* WebGL2RenderingContextBase::createVertexArray() { … }
void WebGL2RenderingContextBase::deleteVertexArray(
WebGLVertexArrayObject* vertex_array) { … }
GLboolean WebGL2RenderingContextBase::isVertexArray(
WebGLVertexArrayObject* vertex_array) { … }
void WebGL2RenderingContextBase::bindVertexArray(
WebGLVertexArrayObject* vertex_array) { … }
void WebGL2RenderingContextBase::bindFramebuffer(GLenum target,
WebGLFramebuffer* buffer) { … }
void WebGL2RenderingContextBase::deleteFramebuffer(
WebGLFramebuffer* framebuffer) { … }
ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGL2RenderingContextBase::GetInt64Parameter(
ScriptState* script_state,
GLenum pname) { … }
bool WebGL2RenderingContextBase::ValidateCapability(const char* function_name,
GLenum cap) { … }
bool WebGL2RenderingContextBase::ValidateBufferTargetCompatibility(
const char* function_name,
GLenum target,
WebGLBuffer* buffer) { … }
bool WebGL2RenderingContextBase::ValidateBufferTarget(const char* function_name,
GLenum target) { … }
bool WebGL2RenderingContextBase::ValidateAndUpdateBufferBindTarget(
const char* function_name,
GLenum target,
WebGLBuffer* buffer) { … }
bool WebGL2RenderingContextBase::ValidateBufferBaseTarget(
const char* function_name,
GLenum target) { … }
bool WebGL2RenderingContextBase::ValidateAndUpdateBufferBindBaseTarget(
const char* function_name,
GLenum target,
GLuint index,
WebGLBuffer* buffer) { … }
bool WebGL2RenderingContextBase::ValidateFramebufferTarget(GLenum target) { … }
bool WebGL2RenderingContextBase::ValidateReadPixelsFormatAndType(
GLenum format,
GLenum type,
DOMArrayBufferView* buffer) { … }
WebGLFramebuffer* WebGL2RenderingContextBase::GetFramebufferBinding(
GLenum target) { … }
WebGLFramebuffer* WebGL2RenderingContextBase::GetReadFramebufferBinding() { … }
bool WebGL2RenderingContextBase::ValidateGetFramebufferAttachmentParameterFunc(
const char* function_name,
GLenum target,
GLenum attachment) { … }
ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter(
ScriptState* script_state,
GLenum target,
GLenum attachment,
GLenum pname) { … }
void WebGL2RenderingContextBase::Trace(Visitor* visitor) const { … }
WebGLTexture* WebGL2RenderingContextBase::ValidateTexture3DBinding(
const char* function_name,
GLenum target,
bool validate_opaque_textures) { … }
GLint WebGL2RenderingContextBase::GetMaxTextureLevelForTarget(GLenum target) { … }
ScriptValue WebGL2RenderingContextBase::getTexParameter(
ScriptState* script_state,
GLenum target,
GLenum pname) { … }
WebGLBuffer* WebGL2RenderingContextBase::ValidateBufferDataTarget(
const char* function_name,
GLenum target) { … }
bool WebGL2RenderingContextBase::ValidateBufferDataUsage(
const char* function_name,
GLenum usage) { … }
const char* WebGL2RenderingContextBase::ValidateGetBufferSubData(
const char* function_name,
GLenum target,
int64_t source_byte_offset,
DOMArrayBufferView* destination_array_buffer_view,
int64_t destination_offset,
GLuint length,
WebGLBuffer** out_source_buffer,
void** out_destination_data_ptr,
int64_t* out_destination_byte_length) { … }
const char* WebGL2RenderingContextBase::ValidateGetBufferSubDataBounds(
const char* function_name,
WebGLBuffer* source_buffer,
GLintptr source_byte_offset,
int64_t destination_byte_length) { … }
void WebGL2RenderingContextBase::RemoveBoundBuffer(WebGLBuffer* buffer) { … }
void WebGL2RenderingContextBase::RestoreCurrentFramebuffer() { … }
void WebGL2RenderingContextBase::useProgram(WebGLProgram* program) { … }
GLint WebGL2RenderingContextBase::GetMaxTransformFeedbackSeparateAttribs()
const { … }
WebGLImageConversion::PixelStoreParams
WebGL2RenderingContextBase::GetPackPixelStoreParams() { … }
WebGLImageConversion::PixelStoreParams
WebGL2RenderingContextBase::GetUnpackPixelStoreParams(
TexImageDimension dimension) { … }
void WebGL2RenderingContextBase::
DrawingBufferClientRestorePixelUnpackBufferBinding() { … }
void WebGL2RenderingContextBase::
DrawingBufferClientRestorePixelPackBufferBinding() { … }
void WebGL2RenderingContextBase::
DrawingBufferClientRestorePixelPackParameters() { … }
}