mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Add stubbed-out WebGL2RenderingContext
This commit is contained in:
committed by
Alexander Kalenik
parent
7868b03d90
commit
af536e1192
Notes:
github-actions[bot]
2024-12-06 14:36:41 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/af536e11922 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2809 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user