/* * Copyright (c) 2024, Andrew Kaster * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::WebGL { class WebGLSync : public WebGLObject { WEB_PLATFORM_OBJECT(WebGLSync, WebGLObject); GC_DECLARE_ALLOCATOR(WebGLSync); public: static GC::Ref create(JS::Realm& realm, WebGLRenderingContextBase&, GLsyncInternal handle); virtual ~WebGLSync() override; GLsyncInternal sync_handle() const { return m_sync_handle; } protected: explicit WebGLSync(JS::Realm&, WebGLRenderingContextBase&, GLsyncInternal handle); virtual void initialize(JS::Realm&) override; GLsyncInternal m_sync_handle { nullptr }; }; }