mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Make 2D and 3D canvas rendering contexts GC-allocated
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4452b5ca09 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
@@ -15,9 +15,9 @@
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
class WebGLRenderingContextBase
|
||||
: public RefCounted<WebGLRenderingContextBase>
|
||||
, public Weakable<WebGLRenderingContextBase> {
|
||||
class WebGLRenderingContextBase : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLRenderingContextBase, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
virtual ~WebGLRenderingContextBase();
|
||||
|
||||
@@ -62,10 +62,12 @@ public:
|
||||
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
protected:
|
||||
WebGLRenderingContextBase(HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
WebGLRenderingContextBase(HTML::Window&, HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
|
||||
private:
|
||||
JS::Handle<HTML::HTMLCanvasElement> m_canvas_element;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
JS::NonnullGCPtr<HTML::HTMLCanvasElement> m_canvas_element;
|
||||
|
||||
NonnullOwnPtr<GL::GLContext> m_context;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user