mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb/WebGL: Set prototypes of the WebGL objects
This commit is contained in:
committed by
Alexander Kalenik
parent
2e1702a14b
commit
a14cd5dab8
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
* 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/WebGLTexturePrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLTexture.h>
|
||||
|
||||
@@ -13,9 +15,9 @@ namespace Web::WebGL {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(WebGLTexture);
|
||||
|
||||
GC::Ptr<WebGLTexture> WebGLTexture::create(JS::Realm& realm, GLuint handle)
|
||||
GC::Ref<WebGLTexture> WebGLTexture::create(JS::Realm& realm, GLuint handle)
|
||||
{
|
||||
return realm.heap().allocate<WebGLTexture>(realm, handle);
|
||||
return realm.create<WebGLTexture>(realm, handle);
|
||||
}
|
||||
|
||||
WebGLTexture::WebGLTexture(JS::Realm& realm, GLuint handle)
|
||||
@@ -25,4 +27,10 @@ WebGLTexture::WebGLTexture(JS::Realm& realm, GLuint handle)
|
||||
|
||||
WebGLTexture::~WebGLTexture() = default;
|
||||
|
||||
void WebGLTexture::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLTexture);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user