LibWeb/WebGL: Add stub class for WebGLQuery

This is a WebGL 2.0 class
This commit is contained in:
Andrew Kaster 2024-12-05 17:53:50 -07:00 committed by Alexander Kalenik
parent d8ccd6b87c
commit 69e4adbd98
Notes: github-actions[bot] 2024-12-06 14:37:24 +00:00
6 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/Realm.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/WebGLQueryPrototype.h>
#include <LibWeb/WebGL/WebGLQuery.h>
namespace Web::WebGL {
GC_DEFINE_ALLOCATOR(WebGLQuery);
GC::Ref<WebGLQuery> WebGLQuery::create(JS::Realm& realm, GLuint handle)
{
return realm.create<WebGLQuery>(realm, handle);
}
WebGLQuery::WebGLQuery(JS::Realm& realm, GLuint handle)
: WebGLObject(realm, handle)
{
}
WebGLQuery::~WebGLQuery() = default;
void WebGLQuery::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLQuery);
}
}