LibWeb/WebGL+Meta: Stub getSupportedExtensions() and getExtension()

This commit is contained in:
Aliaksandr Kalenik 2024-12-02 21:25:20 +01:00 committed by Alexander Kalenik
parent 64fec8b2de
commit 7e78d7d332
Notes: github-actions[bot] 2024-12-03 22:36:38 +00:00
4 changed files with 20 additions and 2 deletions

View file

@ -150,4 +150,14 @@ void WebGLRenderingContext::allocate_painting_surface_if_needed()
context().allocate_painting_surface_if_needed();
}
Optional<Vector<String>> WebGLRenderingContext::get_supported_extensions() const
{
return {};
}
JS::Object* WebGLRenderingContext::get_extension(String const&)
{
return nullptr;
}
}

View file

@ -39,6 +39,9 @@ public:
void set_size(Gfx::IntSize const&);
void reset_to_default_state();
Optional<Vector<String>> get_supported_extensions() const;
JS::Object* get_extension(String const& name);
private:
virtual void initialize(JS::Realm&) override;

View file

@ -41,8 +41,8 @@ interface mixin WebGLRenderingContextBase {
[FIXME] WebGLContextAttributes? getContextAttributes();
[FIXME] boolean isContextLost();
[FIXME] sequence<DOMString>? getSupportedExtensions();
[FIXME] object? getExtension(DOMString name);
sequence<DOMString>? getSupportedExtensions();
object? getExtension(DOMString name);
undefined activeTexture(GLenum texture);
undefined attachShader(WebGLProgram program, WebGLShader shader);

View file

@ -171,6 +171,11 @@ public:
continue;
}
if (function.name == "getSupportedExtensions"sv || function.name == "getExtension"sv) {
// Implemented in WebGLRenderingContext
continue;
}
StringBuilder function_declaration;
StringBuilder function_parameters;