mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb/WebGL: Set prototypes of the WebGL objects
This commit is contained in:
committed by
Alexander Kalenik
parent
2e1702a14b
commit
a14cd5dab8
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/WebGLFramebufferPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLFramebuffer.h>
|
||||
|
||||
@@ -12,9 +14,9 @@ namespace Web::WebGL {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(WebGLFramebuffer);
|
||||
|
||||
GC::Ptr<WebGLFramebuffer> WebGLFramebuffer::create(JS::Realm& realm, GLuint handle)
|
||||
GC::Ref<WebGLFramebuffer> WebGLFramebuffer::create(JS::Realm& realm, GLuint handle)
|
||||
{
|
||||
return realm.heap().allocate<WebGLFramebuffer>(realm, handle);
|
||||
return realm.create<WebGLFramebuffer>(realm, handle);
|
||||
}
|
||||
|
||||
WebGLFramebuffer::WebGLFramebuffer(JS::Realm& realm, GLuint handle)
|
||||
@@ -24,4 +26,10 @@ WebGLFramebuffer::WebGLFramebuffer(JS::Realm& realm, GLuint handle)
|
||||
|
||||
WebGLFramebuffer::~WebGLFramebuffer() = default;
|
||||
|
||||
void WebGLFramebuffer::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLFramebuffer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user