2024-12-05 19:18:40 -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/WebGLSyncPrototype.h>
|
|
|
|
#include <LibWeb/WebGL/WebGLSync.h>
|
|
|
|
|
|
|
|
namespace Web::WebGL {
|
|
|
|
|
|
|
|
GC_DEFINE_ALLOCATOR(WebGLSync);
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
GC::Ref<WebGLSync> WebGLSync::create(JS::Realm& realm, WebGLRenderingContextBase& context, GLsyncInternal handle)
|
2024-12-05 19:18:40 -07:00
|
|
|
{
|
2024-12-17 06:15:53 +01:00
|
|
|
return realm.create<WebGLSync>(realm, context, handle);
|
2024-12-05 19:18:40 -07:00
|
|
|
}
|
|
|
|
|
2024-12-17 06:15:53 +01:00
|
|
|
WebGLSync::WebGLSync(JS::Realm& realm, WebGLRenderingContextBase& context, GLsyncInternal handle)
|
|
|
|
: WebGLObject(realm, context, 0)
|
2024-12-13 14:42:03 +00:00
|
|
|
, m_sync_handle(handle)
|
2024-12-05 19:18:40 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WebGLSync::~WebGLSync() = default;
|
|
|
|
|
|
|
|
void WebGLSync::initialize(JS::Realm& realm)
|
|
|
|
{
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLSync);
|
2025-04-20 16:22:57 +02:00
|
|
|
Base::initialize(realm);
|
2024-12-05 19:18:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|