mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Move enabling of WebGL compressed texture formats to extensions
This commit is contained in:
committed by
Jelle Raaijmakers
parent
3101565f05
commit
fa8e122dd4
Notes:
github-actions[bot]
2026-03-11 19:21:40 +00:00
Author: https://github.com/cqundefine Commit: https://github.com/LadybirdBrowser/ladybird/commit/fa8e122dd45 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8285 Reviewed-by: https://github.com/gmta ✅
@@ -202,11 +202,6 @@ JS::Object* WebGLRenderingContextBase::get_extension(String const& name)
|
||||
if (name.equals_ignoring_ascii_case("WEBGL_compressed_texture_s3tc"sv)) {
|
||||
if (!m_webgl_compressed_texture_s3tc_extension) {
|
||||
m_webgl_compressed_texture_s3tc_extension = MUST(Extensions::WebGLCompressedTextureS3tc::create(realm(), *this));
|
||||
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_RGB_S3TC_DXT1_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
|
||||
}
|
||||
|
||||
VERIFY(m_webgl_compressed_texture_s3tc_extension);
|
||||
@@ -216,11 +211,6 @@ JS::Object* WebGLRenderingContextBase::get_extension(String const& name)
|
||||
if (name.equals_ignoring_ascii_case("WEBGL_compressed_texture_s3tc_srgb"sv)) {
|
||||
if (!m_webgl_compressed_texture_s3tc_srgb_extension) {
|
||||
m_webgl_compressed_texture_s3tc_srgb_extension = MUST(Extensions::WebGLCompressedTextureS3tcSrgb::create(realm(), *this));
|
||||
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_SRGB_S3TC_DXT1_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT);
|
||||
m_enabled_compressed_texture_formats.append(GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT);
|
||||
}
|
||||
|
||||
VERIFY(m_webgl_compressed_texture_s3tc_srgb_extension);
|
||||
@@ -239,6 +229,11 @@ JS::Object* WebGLRenderingContextBase::get_extension(String const& name)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void WebGLRenderingContextBase::enable_compressed_texture_format(WebIDL::UnsignedLong format)
|
||||
{
|
||||
m_enabled_compressed_texture_formats.append(format);
|
||||
}
|
||||
|
||||
void WebGLRenderingContextBase::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
||||
Reference in New Issue
Block a user