#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
#include <memory>
#include <utility>
#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_macros.h"
#include "base/not_fatal_until.h"
#include "base/numerics/checked_math.h"
#include "base/synchronization/lock.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "device/vr/buildflags/buildflags.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/command_buffer/common/shared_image_capabilities.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
#include "gpu/config/gpu_feature_info.h"
#include "media/base/video_frame.h"
#include "media/renderers/paint_canvas_video_renderer.h"
#include "third_party/blink/public/common/features.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/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/mojom/gpu/gpu.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_htmlcanvaselement_offscreencanvas.h"
#include "third_party/blink/renderer/bindings/modules/v8/webgl_any.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/dactyloscoper.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.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/canvas/predefined_color_space.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/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/svg/graphics/svg_image.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer_view_helpers.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame.h"
#include "third_party/blink/renderer/modules/webgl/angle_instanced_arrays.h"
#include "third_party/blink/renderer/modules/webgl/ext_blend_min_max.h"
#include "third_party/blink/renderer/modules/webgl/ext_frag_depth.h"
#include "third_party/blink/renderer/modules/webgl/ext_shader_texture_lod.h"
#include "third_party/blink/renderer/modules/webgl/ext_texture_filter_anisotropic.h"
#include "third_party/blink/renderer/modules/webgl/gl_string_query.h"
#include "third_party/blink/renderer/modules/webgl/oes_element_index_uint.h"
#include "third_party/blink/renderer/modules/webgl/oes_standard_derivatives.h"
#include "third_party/blink/renderer/modules/webgl/oes_texture_float.h"
#include "third_party/blink/renderer/modules/webgl/oes_texture_float_linear.h"
#include "third_party/blink/renderer/modules/webgl/oes_texture_half_float.h"
#include "third_party/blink/renderer/modules/webgl/oes_texture_half_float_linear.h"
#include "third_party/blink/renderer/modules/webgl/oes_vertex_array_object.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_compressed_texture_astc.h"
#include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_etc.h"
#include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_etc1.h"
#include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_pvrtc.h"
#include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_s3tc.h"
#include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_s3tc_srgb.h"
#include "third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h"
#include "third_party/blink/renderer/modules/webgl/webgl_context_event.h"
#include "third_party/blink/renderer/modules/webgl/webgl_context_group.h"
#include "third_party/blink/renderer/modules/webgl/webgl_debug_renderer_info.h"
#include "third_party/blink/renderer/modules/webgl/webgl_debug_shaders.h"
#include "third_party/blink/renderer/modules/webgl/webgl_depth_texture.h"
#include "third_party/blink/renderer/modules/webgl/webgl_draw_buffers.h"
#include "third_party/blink/renderer/modules/webgl/webgl_framebuffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_lose_context.h"
#include "third_party/blink/renderer/modules/webgl/webgl_program.h"
#include "third_party/blink/renderer/modules/webgl/webgl_renderbuffer.h"
#include "third_party/blink/renderer/modules/webgl/webgl_shader.h"
#include "third_party/blink/renderer/modules/webgl/webgl_shader_precision_format.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/modules/webgl/webgl_vertex_array_object_oes.h"
#include "third_party/blink/renderer/modules/xr/xr_system.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding_macros.h"
#include "third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h"
#include "third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h"
#include "third_party/blink/renderer/platform/graphics/canvas_resource_provider.h"
#include "third_party/blink/renderer/platform/graphics/gpu/image_extractor.h"
#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/skia/sk_image_info_hash.h"
#include "third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.h"
#include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h"
#include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_util.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "third_party/skia/include/core/SkImage.h"
#include "ui/gfx/geometry/size.h"
#define POPULATE_TEX_IMAGE_2D_PARAMS(params, src_type) …
#define POPULATE_TEX_SUB_IMAGE_2D_PARAMS(params, src_type) …
namespace blink {
bool WebGLRenderingContextBase::webgl_context_limits_initialized_ = …;
unsigned WebGLRenderingContextBase::max_active_webgl_contexts_ = …;
unsigned WebGLRenderingContextBase::max_active_webgl_contexts_on_worker_ = …;
namespace {
enum class WebGLANGLEImplementation { … };
constexpr base::TimeDelta kDurationBetweenRestoreAttempts = …;
const int kMaxGLErrorsAllowedToConsole = …;
base::Lock& WebGLContextLimitLock() { … }
WebGLRenderingContextBaseSet;
WebGLRenderingContextBaseSet& ActiveContexts() { … }
WebGLRenderingContextBaseMap;
WebGLRenderingContextBaseMap& ForciblyEvictedContexts() { … }
}
ScopedRGBEmulationColorMask::ScopedRGBEmulationColorMask(
WebGLRenderingContextBase* context,
GLboolean* color_mask,
DrawingBuffer* drawing_buffer)
: … { … }
ScopedRGBEmulationColorMask::~ScopedRGBEmulationColorMask() { … }
void WebGLRenderingContextBase::InitializeWebGLContextLimits(
WebGraphicsContext3DProvider* context_provider) { … }
unsigned WebGLRenderingContextBase::CurrentMaxGLContexts() { … }
void WebGLRenderingContextBase::ForciblyLoseOldestContext(
const String& reason) { … }
WebGLRenderingContextBase* WebGLRenderingContextBase::OldestContext() { … }
WebGLRenderingContextBase* WebGLRenderingContextBase::OldestEvictedContext() { … }
void WebGLRenderingContextBase::ActivateContext(
WebGLRenderingContextBase* context) { … }
void WebGLRenderingContextBase::DeactivateContext(
WebGLRenderingContextBase* context) { … }
void WebGLRenderingContextBase::AddToEvictedList(
WebGLRenderingContextBase* context) { … }
void WebGLRenderingContextBase::RemoveFromEvictedList(
WebGLRenderingContextBase* context) { … }
void WebGLRenderingContextBase::RestoreEvictedContext(
WebGLRenderingContextBase* context) { … }
namespace {
GLint Clamp(GLint value, GLint min, GLint max) { … }
class ReplaceNonASCII { … };
static bool g_should_fail_context_creation_for_testing = …;
}
class ScopedPixelLocalStorageInterrupt { … };
class ScopedTexture2DRestorer { … };
class ScopedFramebufferRestorer { … };
class ScopedUnpackParametersResetRestore { … };
class ScopedDisableRasterizerDiscard { … };
static void FormatWebGLStatusString(const StringView& gl_info,
const StringView& info_string,
StringBuilder& builder) { … }
static String ExtractWebGLContextCreationError(
const Platform::GraphicsInfo& info) { … }
std::unique_ptr<WebGraphicsContext3DProvider>
WebGLRenderingContextBase::CreateContextProviderInternal(
CanvasRenderingContextHost* host,
const CanvasContextCreationAttributesCore& attributes,
Platform::ContextType context_type,
Platform::GraphicsInfo* graphics_info) { … }
std::unique_ptr<WebGraphicsContext3DProvider>
WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider(
CanvasRenderingContextHost* host,
const CanvasContextCreationAttributesCore& attributes,
Platform::ContextType context_type,
Platform::GraphicsInfo* graphics_info) { … }
void WebGLRenderingContextBase::ForceNextWebGLContextCreationToFail() { … }
ImageBitmap* WebGLRenderingContextBase::TransferToImageBitmapBase(
ScriptState* script_state) { … }
void WebGLRenderingContextBase::drawingBufferStorage(GLenum sizedformat,
GLsizei width,
GLsizei height) { … }
void WebGLRenderingContextBase::commit() { … }
scoped_refptr<StaticBitmapImage> WebGLRenderingContextBase::GetImage(
FlushReason reason) { … }
ScriptPromise<IDLUndefined> WebGLRenderingContextBase::makeXRCompatible(
ScriptState* script_state,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::IsXRCompatible() const { … }
bool WebGLRenderingContextBase::IsXrCompatibleFromResult(
device::mojom::blink::XrCompatibleResult result) { … }
bool WebGLRenderingContextBase::DidGpuRestart(
device::mojom::blink::XrCompatibleResult result) { … }
XRSystem* WebGLRenderingContextBase::GetXrSystemFromHost(
CanvasRenderingContextHost* host) { … }
bool WebGLRenderingContextBase::MakeXrCompatibleSync(
CanvasRenderingContextHost* host) { … }
void WebGLRenderingContextBase::MakeXrCompatibleAsync() { … }
void WebGLRenderingContextBase::OnMakeXrCompatibleFinished(
device::mojom::blink::XrCompatibleResult xr_compatible_result) { … }
void WebGLRenderingContextBase::CompleteXrCompatiblePromiseIfPending(
DOMExceptionCode exception_code) { … }
void WebGLRenderingContextBase::
UpdateNumberOfUserAllocatedMultisampledRenderbuffers(int delta) { … }
namespace {
static const GLenum kSupportedInternalFormatsOESDepthTex[] = …;
static const GLenum kSupportedInternalFormatsEXTsRGB[] = …;
static const GLenum kSupportedInternalFormatsES3[] = …;
static const GLenum kSupportedInternalFormatsTexImageES3[] = …;
static constexpr GLenum kSupportedInternalFormatsEXTTextureNorm16ES3[] = …;
static constexpr GLenum kSupportedFormatsEXTTextureNorm16ES3[] = …;
static constexpr GLenum kSupportedTypesEXTTextureNorm16ES3[] = …;
static const GLenum kSupportedInternalFormatsCopyTexImageFloatES3[] = …;
static const GLenum kSupportedInternalFormatsCopyTexImageHalfFloatES3[] = …;
static const GLenum kSupportedInternalFormatsTexImageSourceES3[] = …;
static const GLenum kSupportedFormatsES2[] = …;
static const GLenum kSupportedFormatsOESDepthTex[] = …;
static const GLenum kSupportedFormatsEXTsRGB[] = …;
static const GLenum kSupportedFormatsES3[] = …;
static const GLenum kSupportedFormatsTexImageSourceES3[] = …;
static const GLenum kSupportedTypesES2[] = …;
static const GLenum kSupportedTypesOESTexFloat[] = …;
static const GLenum kSupportedTypesOESTexHalfFloat[] = …;
static const GLenum kSupportedTypesOESDepthTex[] = …;
static const GLenum kSupportedTypesES3[] = …;
static const GLenum kSupportedTypesTexImageSourceES3[] = …;
}
WebGLRenderingContextBase::WebGLRenderingContextBase(
CanvasRenderingContextHost* host,
std::unique_ptr<WebGraphicsContext3DProvider> context_provider,
const Platform::GraphicsInfo& graphics_info,
const CanvasContextCreationAttributesCore& requested_attributes,
Platform::ContextType version)
: … { … }
WebGLRenderingContextBase::WebGLRenderingContextBase(
CanvasRenderingContextHost* host,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
std::unique_ptr<WebGraphicsContext3DProvider> context_provider,
const Platform::GraphicsInfo& graphics_info,
const CanvasContextCreationAttributesCore& requested_attributes,
Platform::ContextType context_type)
: … { … }
scoped_refptr<DrawingBuffer> WebGLRenderingContextBase::CreateDrawingBuffer(
std::unique_ptr<WebGraphicsContext3DProvider> context_provider,
const Platform::GraphicsInfo& graphics_info) { … }
void WebGLRenderingContextBase::InitializeNewContext() { … }
void WebGLRenderingContextBase::SetupFlags() { … }
void WebGLRenderingContextBase::AddCompressedTextureFormat(GLenum format) { … }
void WebGLRenderingContextBase::RemoveAllCompressedTextureFormats() { … }
unsigned WebGLRenderingContextBase::GetWebGLVersion(
const CanvasRenderingContext* context) { … }
WebGLRenderingContextBase::~WebGLRenderingContextBase() { … }
void WebGLRenderingContextBase::DestroyContext() { … }
void WebGLRenderingContextBase::MarkContextChanged(
ContentChangeType change_type,
CanvasPerformanceMonitor::DrawType draw_type) { … }
scoped_refptr<base::SingleThreadTaskRunner>
WebGLRenderingContextBase::GetContextTaskRunner() { … }
bool WebGLRenderingContextBase::PushFrame() { … }
bool WebGLRenderingContextBase::PushFrameNoCopy() { … }
bool WebGLRenderingContextBase::PushFrameWithCopy() { … }
void WebGLRenderingContextBase::FinalizeFrame(FlushReason) { … }
void WebGLRenderingContextBase::OnErrorMessage(const char* message,
int32_t id) { … }
WebGLRenderingContextBase::HowToClear
WebGLRenderingContextBase::ClearIfComposited(
WebGLRenderingContextBase::ClearCaller caller,
GLbitfield mask) { … }
void WebGLRenderingContextBase::RestoreScissorEnabled() { … }
void WebGLRenderingContextBase::RestoreScissorBox() { … }
void WebGLRenderingContextBase::RestoreClearColor() { … }
void WebGLRenderingContextBase::RestoreColorMask() { … }
void WebGLRenderingContextBase::MarkLayerComposited() { … }
bool WebGLRenderingContextBase::UsingSwapChain() const { … }
bool WebGLRenderingContextBase::IsOriginTopLeft() const { … }
void WebGLRenderingContextBase::PageVisibilityChanged() { … }
bool WebGLRenderingContextBase::PaintRenderingResultsToCanvas(
SourceDrawingBuffer source_buffer) { … }
bool WebGLRenderingContextBase::CopyRenderingResultsFromDrawingBuffer(
CanvasResourceProvider* resource_provider,
SourceDrawingBuffer source_buffer) { … }
bool WebGLRenderingContextBase::CopyRenderingResultsToVideoFrame(
WebGraphicsContext3DVideoFramePool* frame_pool,
SourceDrawingBuffer src_buffer,
const gfx::ColorSpace& dst_color_space,
VideoFrameCopyCompletedCallback callback) { … }
gfx::Size WebGLRenderingContextBase::DrawingBufferSize() const { … }
sk_sp<SkData> WebGLRenderingContextBase::PaintRenderingResultsToDataArray(
SourceDrawingBuffer source_buffer) { … }
void WebGLRenderingContextBase::Reshape(int width, int height) { … }
int WebGLRenderingContextBase::drawingBufferWidth() const { … }
int WebGLRenderingContextBase::drawingBufferHeight() const { … }
GLenum WebGLRenderingContextBase::drawingBufferFormat() const { … }
V8PredefinedColorSpace WebGLRenderingContextBase::drawingBufferColorSpace()
const { … }
void WebGLRenderingContextBase::setDrawingBufferColorSpace(
const V8PredefinedColorSpace& v8_color_space,
ExceptionState& exception_state) { … }
V8PredefinedColorSpace WebGLRenderingContextBase::unpackColorSpace() const { … }
void WebGLRenderingContextBase::setUnpackColorSpace(
const V8PredefinedColorSpace& v8_color_space,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::activeTexture(GLenum texture) { … }
void WebGLRenderingContextBase::attachShader(WebGLProgram* program,
WebGLShader* shader) { … }
void WebGLRenderingContextBase::bindAttribLocation(WebGLProgram* program,
GLuint index,
const String& name) { … }
bool WebGLRenderingContextBase::ValidateAndUpdateBufferBindTarget(
const char* function_name,
GLenum target,
WebGLBuffer* buffer) { … }
void WebGLRenderingContextBase::bindBuffer(GLenum target, WebGLBuffer* buffer) { … }
void WebGLRenderingContextBase::bindFramebuffer(GLenum target,
WebGLFramebuffer* buffer) { … }
void WebGLRenderingContextBase::bindRenderbuffer(
GLenum target,
WebGLRenderbuffer* render_buffer) { … }
void WebGLRenderingContextBase::bindTexture(GLenum target,
WebGLTexture* texture) { … }
void WebGLRenderingContextBase::blendColor(GLfloat red,
GLfloat green,
GLfloat blue,
GLfloat alpha) { … }
void WebGLRenderingContextBase::blendEquation(GLenum mode) { … }
void WebGLRenderingContextBase::blendEquationSeparate(GLenum mode_rgb,
GLenum mode_alpha) { … }
void WebGLRenderingContextBase::blendFunc(GLenum sfactor, GLenum dfactor) { … }
void WebGLRenderingContextBase::blendFuncSeparate(GLenum src_rgb,
GLenum dst_rgb,
GLenum src_alpha,
GLenum dst_alpha) { … }
bool WebGLRenderingContextBase::ValidateBufferDataBufferSize(
const char* function_name,
int64_t size) { … }
void WebGLRenderingContextBase::BufferDataImpl(GLenum target,
int64_t size,
const void* data,
GLenum usage) { … }
void WebGLRenderingContextBase::bufferData(GLenum target,
int64_t size,
GLenum usage) { … }
void WebGLRenderingContextBase::bufferData(GLenum target,
DOMArrayBufferBase* data,
GLenum usage) { … }
void WebGLRenderingContextBase::bufferData(GLenum target,
MaybeShared<DOMArrayBufferView> data,
GLenum usage) { … }
void WebGLRenderingContextBase::BufferSubDataImpl(GLenum target,
int64_t offset,
int64_t size,
const void* data) { … }
void WebGLRenderingContextBase::bufferSubData(GLenum target,
int64_t offset,
base::span<const uint8_t> data) { … }
bool WebGLRenderingContextBase::ValidateFramebufferTarget(GLenum target) { … }
WebGLFramebuffer* WebGLRenderingContextBase::GetFramebufferBinding(
GLenum target) { … }
WebGLFramebuffer* WebGLRenderingContextBase::GetReadFramebufferBinding() { … }
GLenum WebGLRenderingContextBase::checkFramebufferStatus(GLenum target) { … }
void WebGLRenderingContextBase::clear(GLbitfield mask) { … }
void WebGLRenderingContextBase::clearColor(GLfloat r,
GLfloat g,
GLfloat b,
GLfloat a) { … }
void WebGLRenderingContextBase::clearDepth(GLfloat depth) { … }
void WebGLRenderingContextBase::clearStencil(GLint s) { … }
void WebGLRenderingContextBase::colorMask(GLboolean red,
GLboolean green,
GLboolean blue,
GLboolean alpha) { … }
void WebGLRenderingContextBase::compileShader(WebGLShader* shader) { … }
void WebGLRenderingContextBase::compressedTexImage2D(
GLenum target,
GLint level,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLint border,
MaybeShared<DOMArrayBufferView> data) { … }
void WebGLRenderingContextBase::compressedTexSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
MaybeShared<DOMArrayBufferView> data) { … }
bool WebGLRenderingContextBase::ValidateSettableTexFormat(
const char* function_name,
GLenum format) { … }
bool WebGLRenderingContextBase::ValidateCopyTexFormat(const char* function_name,
GLenum internalformat) { … }
void WebGLRenderingContextBase::copyTexImage2D(GLenum target,
GLint level,
GLenum internalformat,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint border) { … }
void WebGLRenderingContextBase::copyTexSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
WebGLBuffer* WebGLRenderingContextBase::createBuffer() { … }
WebGLFramebuffer* WebGLRenderingContextBase::createFramebuffer() { … }
WebGLTexture* WebGLRenderingContextBase::createTexture() { … }
WebGLProgram* WebGLRenderingContextBase::createProgram() { … }
WebGLRenderbuffer* WebGLRenderingContextBase::createRenderbuffer() { … }
void WebGLRenderingContextBase::SetBoundVertexArrayObject(
WebGLVertexArrayObjectBase* array_object) { … }
WebGLShader* WebGLRenderingContextBase::createShader(GLenum type) { … }
void WebGLRenderingContextBase::cullFace(GLenum mode) { … }
bool WebGLRenderingContextBase::DeleteObject(WebGLObject* object) { … }
void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer) { … }
void WebGLRenderingContextBase::deleteFramebuffer(
WebGLFramebuffer* framebuffer) { … }
void WebGLRenderingContextBase::deleteProgram(WebGLProgram* program) { … }
void WebGLRenderingContextBase::deleteRenderbuffer(
WebGLRenderbuffer* renderbuffer) { … }
void WebGLRenderingContextBase::deleteShader(WebGLShader* shader) { … }
void WebGLRenderingContextBase::deleteTexture(WebGLTexture* texture) { … }
void WebGLRenderingContextBase::depthFunc(GLenum func) { … }
void WebGLRenderingContextBase::depthMask(GLboolean flag) { … }
void WebGLRenderingContextBase::depthRange(GLfloat z_near, GLfloat z_far) { … }
void WebGLRenderingContextBase::detachShader(WebGLProgram* program,
WebGLShader* shader) { … }
void WebGLRenderingContextBase::disable(GLenum cap) { … }
void WebGLRenderingContextBase::disableVertexAttribArray(GLuint index) { … }
bool WebGLRenderingContextBase::ValidateRenderingState(
const char* function_name) { … }
bool WebGLRenderingContextBase::ValidateNullableWebGLObject(
const char* function_name,
WebGLObject* object) { … }
bool WebGLRenderingContextBase::ValidateWebGLObject(const char* function_name,
WebGLObject* object) { … }
bool WebGLRenderingContextBase::ValidateWebGLProgramOrShader(
const char* function_name,
WebGLObject* object) { … }
void WebGLRenderingContextBase::drawArrays(GLenum mode,
GLint first,
GLsizei count) { … }
void WebGLRenderingContextBase::drawElements(GLenum mode,
GLsizei count,
GLenum type,
int64_t offset) { … }
void WebGLRenderingContextBase::DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
GLsizei primcount) { … }
void WebGLRenderingContextBase::DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
int64_t offset,
GLsizei primcount) { … }
void WebGLRenderingContextBase::enable(GLenum cap) { … }
void WebGLRenderingContextBase::enableVertexAttribArray(GLuint index) { … }
void WebGLRenderingContextBase::finish() { … }
void WebGLRenderingContextBase::flush() { … }
void WebGLRenderingContextBase::framebufferRenderbuffer(
GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
WebGLRenderbuffer* buffer) { … }
void WebGLRenderingContextBase::framebufferTexture2D(GLenum target,
GLenum attachment,
GLenum textarget,
WebGLTexture* texture,
GLint level) { … }
void WebGLRenderingContextBase::frontFace(GLenum mode) { … }
void WebGLRenderingContextBase::generateMipmap(GLenum target) { … }
WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib(
WebGLProgram* program,
GLuint index) { … }
WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform(
WebGLProgram* program,
GLuint index) { … }
std::optional<HeapVector<Member<WebGLShader>>>
WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program) { … }
GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program,
const String& name) { … }
bool WebGLRenderingContextBase::ValidateBufferTarget(const char* function_name,
GLenum target) { … }
ScriptValue WebGLRenderingContextBase::getBufferParameter(
ScriptState* script_state,
GLenum target,
GLenum pname) { … }
WebGLContextAttributes* WebGLRenderingContextBase::getContextAttributes()
const { … }
GLenum WebGLRenderingContextBase::getError() { … }
bool WebGLRenderingContextBase::ExtensionTracker::MatchesName(
const String& name) const { … }
bool WebGLRenderingContextBase::ExtensionSupportedAndAllowed(
const ExtensionTracker* tracker) { … }
WebGLExtension* WebGLRenderingContextBase::EnableExtensionIfSupported(
const String& name) { … }
bool WebGLRenderingContextBase::TimerQueryExtensionsEnabled() { … }
ScriptValue WebGLRenderingContextBase::getExtension(ScriptState* script_state,
const String& name) { … }
ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter(
ScriptState* script_state,
GLenum target,
GLenum attachment,
GLenum pname) { … }
namespace {
static const GLenum kIdentifiableGLParams[] = …;
bool ShouldMeasureGLParam(GLenum pname) { … }
}
void WebGLRenderingContextBase::RecordIdentifiableGLParameterDigest(
GLenum pname,
IdentifiableToken value) { … }
void WebGLRenderingContextBase::RecordShaderPrecisionFormatForStudy(
GLenum shader_type,
GLenum precision_type,
WebGLShaderPrecisionFormat* format) { … }
void WebGLRenderingContextBase::RecordANGLEImplementation() { … }
ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::getProgramParameter(
ScriptState* script_state,
WebGLProgram* program,
GLenum pname) { … }
String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program) { … }
ScriptValue WebGLRenderingContextBase::getRenderbufferParameter(
ScriptState* script_state,
GLenum target,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::getShaderParameter(
ScriptState* script_state,
WebGLShader* shader,
GLenum pname) { … }
String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader) { … }
WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat(
GLenum shader_type,
GLenum precision_type) { … }
String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) { … }
std::optional<Vector<String>>
WebGLRenderingContextBase::getSupportedExtensions() { … }
ScriptValue WebGLRenderingContextBase::getTexParameter(
ScriptState* script_state,
GLenum target,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::getUniform(
ScriptState* script_state,
WebGLProgram* program,
const WebGLUniformLocation* uniform_location) { … }
WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation(
WebGLProgram* program,
const String& name) { … }
ScriptValue WebGLRenderingContextBase::getVertexAttrib(
ScriptState* script_state,
GLuint index,
GLenum pname) { … }
int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index,
GLenum pname) { … }
void WebGLRenderingContextBase::hint(GLenum target, GLenum mode) { … }
GLboolean WebGLRenderingContextBase::isBuffer(WebGLBuffer* buffer) { … }
bool WebGLRenderingContextBase::isContextLost() const { … }
GLboolean WebGLRenderingContextBase::isEnabled(GLenum cap) { … }
GLboolean WebGLRenderingContextBase::isFramebuffer(
WebGLFramebuffer* framebuffer) { … }
GLboolean WebGLRenderingContextBase::isProgram(WebGLProgram* program) { … }
GLboolean WebGLRenderingContextBase::isRenderbuffer(
WebGLRenderbuffer* renderbuffer) { … }
GLboolean WebGLRenderingContextBase::isShader(WebGLShader* shader) { … }
GLboolean WebGLRenderingContextBase::isTexture(WebGLTexture* texture) { … }
void WebGLRenderingContextBase::lineWidth(GLfloat width) { … }
void WebGLRenderingContextBase::linkProgram(WebGLProgram* program) { … }
void WebGLRenderingContextBase::pixelStorei(GLenum pname, GLint param) { … }
void WebGLRenderingContextBase::polygonOffset(GLfloat factor, GLfloat units) { … }
bool WebGLRenderingContextBase::ValidateReadBufferAndGetInfo(
const char* function_name,
WebGLFramebuffer*& read_framebuffer_binding) { … }
bool WebGLRenderingContextBase::ValidateReadPixelsFormatAndType(
GLenum format,
GLenum type,
DOMArrayBufferView* buffer) { … }
WebGLImageConversion::PixelStoreParams
WebGLRenderingContextBase::GetPackPixelStoreParams() { … }
WebGLImageConversion::PixelStoreParams
WebGLRenderingContextBase::GetUnpackPixelStoreParams(TexImageDimension) { … }
bool WebGLRenderingContextBase::ValidateReadPixelsFuncParameters(
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
DOMArrayBufferView* buffer,
int64_t buffer_size) { … }
void WebGLRenderingContextBase::readPixels(
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGLRenderingContextBase::ReadPixelsHelper(GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
DOMArrayBufferView* pixels,
int64_t offset) { … }
void WebGLRenderingContextBase::RenderbufferStorageImpl(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height,
const char* function_name) { … }
void WebGLRenderingContextBase::renderbufferStorage(GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height) { … }
void WebGLRenderingContextBase::sampleCoverage(GLfloat value,
GLboolean invert) { … }
void WebGLRenderingContextBase::scissor(GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
void WebGLRenderingContextBase::shaderSource(WebGLShader* shader,
const String& string) { … }
void WebGLRenderingContextBase::stencilFunc(GLenum func,
GLint ref,
GLuint mask) { … }
void WebGLRenderingContextBase::stencilFuncSeparate(GLenum face,
GLenum func,
GLint ref,
GLuint mask) { … }
void WebGLRenderingContextBase::stencilMask(GLuint mask) { … }
void WebGLRenderingContextBase::stencilMaskSeparate(GLenum face, GLuint mask) { … }
void WebGLRenderingContextBase::stencilOp(GLenum fail,
GLenum zfail,
GLenum zpass) { … }
void WebGLRenderingContextBase::stencilOpSeparate(GLenum face,
GLenum fail,
GLenum zfail,
GLenum zpass) { … }
GLenum WebGLRenderingContextBase::ConvertTexInternalFormat(
GLenum internalformat,
GLenum type) { … }
void WebGLRenderingContextBase::GetCurrentUnpackState(TexImageParams& params) { … }
void WebGLRenderingContextBase::TexImageSkImage(TexImageParams params,
sk_sp<SkImage> image,
bool image_has_flip_y) { … }
void WebGLRenderingContextBase::TexImageBase(const TexImageParams& params,
const void* pixels) { … }
void WebGLRenderingContextBase::TexImageStaticBitmapImage(
TexImageParams params,
StaticBitmapImage* image,
bool image_has_flip_y,
bool allow_copy_via_gpu) { … }
bool WebGLRenderingContextBase::ValidateTexFunc(
TexImageParams params,
std::optional<GLsizei> source_width,
std::optional<GLsizei> source_height) { … }
bool WebGLRenderingContextBase::ValidateValueFitNonNegInt32(
const char* function_name,
const char* param_name,
int64_t value) { … }
scoped_refptr<Image> WebGLRenderingContextBase::DrawImageIntoBufferForTexImage(
scoped_refptr<Image> pass_image,
int width,
int height,
const char* function_name) { … }
WebGLTexture* WebGLRenderingContextBase::ValidateTexImageBinding(
const TexImageParams& params) { … }
const char* WebGLRenderingContextBase::GetTexImageFunctionName(
TexImageFunctionID func_name) { … }
WebGLRenderingContextBase::TexImageFunctionType
WebGLRenderingContextBase::GetTexImageFunctionType(
TexImageFunctionID function_id) { … }
gfx::Rect WebGLRenderingContextBase::SafeGetImageSize(Image* image) { … }
SkColorInfo WebGLRenderingContextBase::CanvasRenderingContextSkColorInfo()
const { … }
gfx::Rect WebGLRenderingContextBase::GetImageDataSize(ImageData* pixels) { … }
void WebGLRenderingContextBase::TexImageHelperDOMArrayBufferView(
TexImageParams params,
DOMArrayBufferView* pixels,
NullDisposition null_disposition,
int64_t src_offset) { … }
void WebGLRenderingContextBase::texImage2D(
GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLsizei height,
GLint border,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGLRenderingContextBase::TexImageHelperImageData(TexImageParams params,
ImageData* pixels) { … }
void WebGLRenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGLRenderingContextBase::TexImageHelperHTMLImageElement(
const SecurityOrigin* security_origin,
const TexImageParams& params,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::CanUseTexImageViaGPU(
const TexImageParams& params) { … }
void WebGLRenderingContextBase::TexImageViaGPU(
TexImageParams params,
AcceleratedStaticBitmapImage* source_image,
WebGLRenderingContextBase* source_canvas_webgl_context) { … }
void WebGLRenderingContextBase::TexImageHelperCanvasRenderingContextHost(
const SecurityOrigin* security_origin,
TexImageParams params,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::TexImageHelperHTMLVideoElement(
const SecurityOrigin* security_origin,
TexImageParams params,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::TexImageHelperVideoFrame(
const SecurityOrigin* security_origin,
TexImageParams params,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::TexImageHelperMediaVideoFrame(
TexImageParams params,
WebGLTexture* texture,
scoped_refptr<media::VideoFrame> media_video_frame,
media::PaintCanvasVideoRenderer* video_renderer) { … }
void WebGLRenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::TexImageHelperImageBitmap(
TexImageParams params,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texImage2D(GLenum target,
GLint level,
GLint internalformat,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::TexParameter(GLenum target,
GLenum pname,
GLfloat paramf,
GLint parami,
bool is_float) { … }
void WebGLRenderingContextBase::texParameterf(GLenum target,
GLenum pname,
GLfloat param) { … }
void WebGLRenderingContextBase::texParameteri(GLenum target,
GLenum pname,
GLint param) { … }
void WebGLRenderingContextBase::texSubImage2D(
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
MaybeShared<DOMArrayBufferView> pixels) { … }
void WebGLRenderingContextBase::texSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
ImageData* pixels) { … }
void WebGLRenderingContextBase::texSubImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texSubImage2D(
ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texSubImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texSubImage2D(ScriptState* script_state,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
VideoFrame* frame,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::texSubImage2D(GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
void WebGLRenderingContextBase::uniform1f(const WebGLUniformLocation* location,
GLfloat x) { … }
void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location,
GLint x) { … }
void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location,
GLfloat x,
GLfloat y) { … }
void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location,
GLint x,
GLint y) { … }
void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location,
GLfloat x,
GLfloat y,
GLfloat z) { … }
void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location,
GLint x,
GLint y,
GLint z) { … }
void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w) { … }
void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location,
GLint x,
GLint y,
GLint z,
GLint w) { … }
void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location,
base::span<const GLint> v) { … }
void WebGLRenderingContextBase::uniformMatrix2fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniformMatrix3fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::uniformMatrix4fv(
const WebGLUniformLocation* location,
GLboolean transpose,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::useProgram(WebGLProgram* program) { … }
void WebGLRenderingContextBase::validateProgram(WebGLProgram* program) { … }
void WebGLRenderingContextBase::SetVertexAttribType(
GLuint index,
VertexAttribValueType type) { … }
void WebGLRenderingContextBase::vertexAttrib1f(GLuint index, GLfloat v0) { … }
void WebGLRenderingContextBase::vertexAttrib1fv(GLuint index,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::vertexAttrib2f(GLuint index,
GLfloat v0,
GLfloat v1) { … }
void WebGLRenderingContextBase::vertexAttrib2fv(GLuint index,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::vertexAttrib3f(GLuint index,
GLfloat v0,
GLfloat v1,
GLfloat v2) { … }
void WebGLRenderingContextBase::vertexAttrib3fv(GLuint index,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::vertexAttrib4f(GLuint index,
GLfloat v0,
GLfloat v1,
GLfloat v2,
GLfloat v3) { … }
void WebGLRenderingContextBase::vertexAttrib4fv(GLuint index,
base::span<const GLfloat> v) { … }
void WebGLRenderingContextBase::vertexAttribPointer(GLuint index,
GLint size,
GLenum type,
GLboolean normalized,
GLsizei stride,
int64_t offset) { … }
void WebGLRenderingContextBase::VertexAttribDivisorANGLE(GLuint index,
GLuint divisor) { … }
void WebGLRenderingContextBase::viewport(GLint x,
GLint y,
GLsizei width,
GLsizei height) { … }
void WebGLRenderingContextBase::LoseContext(LostContextMode mode) { … }
void WebGLRenderingContextBase::ForceLostContext(
LostContextMode mode,
AutoRecoveryMethod auto_recovery_method) { … }
void WebGLRenderingContextBase::LoseContextImpl(
WebGLRenderingContextBase::LostContextMode mode,
AutoRecoveryMethod auto_recovery_method) { … }
void WebGLRenderingContextBase::HoldReferenceToDrawingBuffer(DrawingBuffer*) { … }
void WebGLRenderingContextBase::ForceRestoreContext() { … }
uint32_t WebGLRenderingContextBase::NumberOfContextLosses() const { … }
cc::Layer* WebGLRenderingContextBase::CcLayer() const { … }
void WebGLRenderingContextBase::SetHdrMetadata(
const gfx::HDRMetadata& hdr_metadata) { … }
void WebGLRenderingContextBase::SetFilterQuality(
cc::PaintFlags::FilterQuality filter_quality) { … }
Extensions3DUtil* WebGLRenderingContextBase::ExtensionsUtil() { … }
void WebGLRenderingContextBase::Stop() { … }
void WebGLRenderingContextBase::
DrawingBufferClientInterruptPixelLocalStorage() { … }
void WebGLRenderingContextBase::DrawingBufferClientRestorePixelLocalStorage() { … }
bool WebGLRenderingContextBase::DrawingBufferClientIsBoundForDraw() { … }
void WebGLRenderingContextBase::DrawingBufferClientRestoreScissorTest() { … }
void WebGLRenderingContextBase::DrawingBufferClientRestoreMaskAndClearValues() { … }
void WebGLRenderingContextBase::
DrawingBufferClientRestorePixelPackParameters() { … }
void WebGLRenderingContextBase::DrawingBufferClientRestoreTexture2DBinding() { … }
void WebGLRenderingContextBase::
DrawingBufferClientRestoreTextureCubeMapBinding() { … }
void WebGLRenderingContextBase::
DrawingBufferClientRestoreRenderbufferBinding() { … }
void WebGLRenderingContextBase::DrawingBufferClientRestoreFramebufferBinding() { … }
void WebGLRenderingContextBase::
DrawingBufferClientRestorePixelUnpackBufferBinding() { … }
void WebGLRenderingContextBase::
DrawingBufferClientRestorePixelPackBufferBinding() { … }
bool WebGLRenderingContextBase::
DrawingBufferClientUserAllocatedMultisampledRenderbuffers() { … }
void WebGLRenderingContextBase::
DrawingBufferClientForceLostContextWithAutoRecovery(const char* reason) { … }
ScriptValue WebGLRenderingContextBase::GetBooleanParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetBooleanArrayParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetFloatParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetIntParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetInt64Parameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetUnsignedIntParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetWebGLFloatArrayParameter(
ScriptState* script_state,
GLenum pname) { … }
ScriptValue WebGLRenderingContextBase::GetWebGLIntArrayParameter(
ScriptState* script_state,
GLenum pname) { … }
WebGLTexture* WebGLRenderingContextBase::ValidateTexture2DBinding(
const char* function_name,
GLenum target,
bool validate_opaque_textures) { … }
WebGLTexture* WebGLRenderingContextBase::ValidateTextureBinding(
const char* function_name,
GLenum target) { … }
bool WebGLRenderingContextBase::ValidateLocationLength(
const char* function_name,
const String& string) { … }
bool WebGLRenderingContextBase::ValidateSize(const char* function_name,
GLint x,
GLint y,
GLint z) { … }
bool WebGLRenderingContextBase::ValidateCharacter(unsigned char c) { … }
bool WebGLRenderingContextBase::ValidateString(const char* function_name,
const String& string) { … }
bool WebGLRenderingContextBase::IsPrefixReserved(const String& name) { … }
bool WebGLRenderingContextBase::ValidateShaderType(const char* function_name,
GLenum shader_type) { … }
void WebGLRenderingContextBase::AddExtensionSupportedFormatsTypes() { … }
void WebGLRenderingContextBase::AddExtensionSupportedFormatsTypesWebGL2() { … }
bool WebGLRenderingContextBase::ValidateTexImageSourceFormatAndType(
const TexImageParams& params) { … }
bool WebGLRenderingContextBase::ValidateTexFuncFormatAndType(
const TexImageParams& params) { … }
GLint WebGLRenderingContextBase::GetMaxTextureLevelForTarget(GLenum target) { … }
bool WebGLRenderingContextBase::ValidateTexFuncLevel(const char* function_name,
GLenum target,
GLint level) { … }
bool WebGLRenderingContextBase::ValidateTexFuncDimensions(
const char* function_name,
TexImageFunctionType function_type,
GLenum target,
GLint level,
GLsizei width,
GLsizei height,
GLsizei depth) { … }
bool WebGLRenderingContextBase::ValidateTexFuncParameters(
const TexImageParams& params) { … }
bool WebGLRenderingContextBase::ValidateTexFuncData(
const TexImageParams& params,
DOMArrayBufferView* pixels,
NullDisposition disposition,
int64_t src_offset) { … }
bool WebGLRenderingContextBase::ValidateCompressedTexFormat(
const char* function_name,
GLenum format) { … }
bool WebGLRenderingContextBase::ValidateStencilOrDepthFunc(
const char* function_name,
GLenum func) { … }
void WebGLRenderingContextBase::PrintGLErrorToConsole(const String& message) { … }
void WebGLRenderingContextBase::PrintWarningToConsole(const String& message) { … }
void WebGLRenderingContextBase::NotifyWebGLErrorOrWarning(
const String& message) { … }
void WebGLRenderingContextBase::NotifyWebGLError(const String& error_type) { … }
void WebGLRenderingContextBase::NotifyWebGLWarning() { … }
bool WebGLRenderingContextBase::ValidateFramebufferFuncParameters(
const char* function_name,
GLenum target,
GLenum attachment) { … }
bool WebGLRenderingContextBase::ValidateBlendEquation(const char* function_name,
GLenum mode) { … }
bool WebGLRenderingContextBase::ValidateBlendFuncFactors(
const char* function_name,
GLenum src,
GLenum dst) { … }
bool WebGLRenderingContextBase::ValidateBlendFuncExtendedFactors(
const char* function_name,
GLenum src,
GLenum dst) { … }
bool WebGLRenderingContextBase::ValidateCapability(const char* function_name,
GLenum cap) { … }
WebGLBuffer* WebGLRenderingContextBase::ValidateBufferDataTarget(
const char* function_name,
GLenum target) { … }
bool WebGLRenderingContextBase::ValidateBufferDataUsage(
const char* function_name,
GLenum usage) { … }
void WebGLRenderingContextBase::RemoveBoundBuffer(WebGLBuffer* buffer) { … }
bool WebGLRenderingContextBase::ValidateHTMLImageElement(
const SecurityOrigin* security_origin,
const char* function_name,
HTMLImageElement* image,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::ValidateCanvasRenderingContextHost(
const SecurityOrigin* security_origin,
const char* function_name,
CanvasRenderingContextHost* context_host,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::ValidateHTMLVideoElement(
const SecurityOrigin* security_origin,
const char* function_name,
HTMLVideoElement* video,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::ValidateImageBitmap(
const char* function_name,
ImageBitmap* bitmap,
ExceptionState& exception_state) { … }
bool WebGLRenderingContextBase::ValidateDrawArrays(const char* function_name) { … }
bool WebGLRenderingContextBase::ValidateDrawElements(const char* function_name,
GLenum type,
int64_t offset) { … }
void WebGLRenderingContextBase::OnBeforeDrawCall(
CanvasPerformanceMonitor::DrawType draw_type) { … }
void WebGLRenderingContextBase::DispatchContextLostEvent(TimerBase*) { … }
void WebGLRenderingContextBase::MaybeRestoreContext(TimerBase*) { … }
String WebGLRenderingContextBase::EnsureNotNull(const String& text) const { … }
WebGLRenderingContextBase::LRUCanvasResourceProviderCache::
LRUCanvasResourceProviderCache(wtf_size_t capacity, CacheType type)
: … { … }
CanvasResourceProvider* WebGLRenderingContextBase::
LRUCanvasResourceProviderCache::GetCanvasResourceProvider(
const SkImageInfo& info) { … }
void WebGLRenderingContextBase::LRUCanvasResourceProviderCache::BubbleToFront(
wtf_size_t idx) { … }
namespace {
String GetErrorString(GLenum error) { … }
}
void WebGLRenderingContextBase::SynthesizeGLError(
GLenum error,
const char* function_name,
const char* description,
ConsoleDisplayPreference display) { … }
void WebGLRenderingContextBase::EmitGLWarning(const char* function_name,
const char* description) { … }
void WebGLRenderingContextBase::ApplyDepthAndStencilTest() { … }
void WebGLRenderingContextBase::EnableOrDisable(GLenum capability,
bool enable) { … }
gfx::Size WebGLRenderingContextBase::ClampedCanvasSize() const { … }
GLint WebGLRenderingContextBase::MaxDrawBuffers() { … }
GLint WebGLRenderingContextBase::MaxColorAttachments() { … }
void WebGLRenderingContextBase::SetBackDrawBuffer(GLenum buf) { … }
void WebGLRenderingContextBase::SetFramebuffer(GLenum target,
WebGLFramebuffer* buffer) { … }
void WebGLRenderingContextBase::RestoreCurrentFramebuffer() { … }
void WebGLRenderingContextBase::RestoreCurrentTexture2D() { … }
void WebGLRenderingContextBase::RestoreCurrentTextureCubeMap() { … }
void WebGLRenderingContextBase::FindNewMaxNonDefaultTextureUnit() { … }
void WebGLRenderingContextBase::TextureUnitState::Trace(
blink::Visitor* visitor) const { … }
void WebGLRenderingContextBase::Trace(Visitor* visitor) const { … }
int WebGLRenderingContextBase::ExternallyAllocatedBufferCountPerPixel() { … }
DrawingBuffer* WebGLRenderingContextBase::GetDrawingBuffer() const { … }
void WebGLRenderingContextBase::ResetUnpackParameters() { … }
void WebGLRenderingContextBase::RestoreUnpackParameters() { … }
V8UnionHTMLCanvasElementOrOffscreenCanvas*
WebGLRenderingContextBase::getHTMLOrOffscreenCanvas() const { … }
void WebGLRenderingContextBase::addProgramCompletionQuery(WebGLProgram* program,
GLuint query) { … }
void WebGLRenderingContextBase::clearProgramCompletionQueries() { … }
bool WebGLRenderingContextBase::checkProgramCompletionQueryAvailable(
WebGLProgram* program,
bool* completed) { … }
}