LibWeb/WebGL: Implement getContextAttributes()

This commit is contained in:
Aliaksandr Kalenik 2024-12-05 02:59:00 +01:00 committed by Andreas Kling
commit c817eb8d2b
Notes: github-actions[bot] 2024-12-05 08:57:56 +00:00
8 changed files with 22 additions and 18 deletions

View file

@ -131,6 +131,13 @@ bool WebGLRenderingContext::is_context_lost() const
return m_context_lost;
}
Optional<WebGLContextAttributes> WebGLRenderingContext::get_context_attributes()
{
if (is_context_lost())
return {};
return m_actual_context_parameters;
}
void WebGLRenderingContext::set_size(Gfx::IntSize const& size)
{
context().set_size(size);