2024-12-05 17:53:50 -07:00
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
GC::Ref<WebGLQuery> WebGLQuery::create(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
2024-12-05 17:53:50 -07:00
|
|
|
{
|
2024-12-17 06:15:53 +01:00
|
|
|
return realm.create<WebGLQuery>(realm, context, handle);
|
2024-12-05 17:53:50 -07:00
|
|
|
}
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
WebGLQuery::WebGLQuery(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
|
|
|
|
: WebGLObject(realm, context, handle)
|
2024-12-05 17:53:50 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLQuery::~WebGLQuery() = default;
|
|
|
|
|
|
|
|
void WebGLQuery::initialize(JS::Realm& realm)
|
|
|
|
{
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLQuery);
|
2025-04-20 16:22:57 +02:00
|
|
|
Base::initialize(realm);
|
2024-12-05 17:53:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|