mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Add stubbed-out WebGL2RenderingContext
This commit is contained in:
parent
7868b03d90
commit
af536e1192
Notes:
github-actions[bot]
2024-12-06 14:36:41 +00:00
Author: https://github.com/ADKaster
Commit: af536e1192
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2809
Reviewed-by: https://github.com/kalenikaliaksandr ✅
19 changed files with 851 additions and 17 deletions
|
@ -19,7 +19,7 @@ class HTMLCanvasElement final : public HTMLElement {
|
|||
GC_DECLARE_ALLOCATOR(HTMLCanvasElement);
|
||||
|
||||
public:
|
||||
using RenderingContext = Variant<GC::Root<CanvasRenderingContext2D>, GC::Root<WebGL::WebGLRenderingContext>, Empty>;
|
||||
using RenderingContext = Variant<GC::Root<CanvasRenderingContext2D>, GC::Root<WebGL::WebGLRenderingContext>, GC::Root<WebGL::WebGL2RenderingContext>, Empty>;
|
||||
|
||||
virtual ~HTMLCanvasElement() override;
|
||||
|
||||
|
@ -57,11 +57,12 @@ private:
|
|||
virtual GC::Ptr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
|
||||
virtual void adjust_computed_style(CSS::StyleProperties&) override;
|
||||
|
||||
template<typename ContextType>
|
||||
JS::ThrowCompletionOr<HasOrCreatedContext> create_webgl_context(JS::Value options);
|
||||
void reset_context_to_default_state();
|
||||
void notify_context_about_canvas_size_change();
|
||||
|
||||
Variant<GC::Ref<HTML::CanvasRenderingContext2D>, GC::Ref<WebGL::WebGLRenderingContext>, Empty> m_context;
|
||||
Variant<GC::Ref<HTML::CanvasRenderingContext2D>, GC::Ref<WebGL::WebGLRenderingContext>, GC::Ref<WebGL::WebGL2RenderingContext>, Empty> m_context;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue