ladybird/Libraries/LibWeb/WebGL/WebGLObject.cpp

37 lines
879 B
C++
Raw Normal View History

2024-11-13 09:31:46 +01:00
/*
* 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>
2024-11-13 09:31:46 +01:00
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/WebGLObjectPrototype.h>
2024-11-13 09:31:46 +01:00
#include <LibWeb/WebGL/WebGLObject.h>
namespace Web::WebGL {
WebGLObject::WebGLObject(JS::Realm& realm, WebGLRenderingContextBase& context, GLuint handle)
2024-11-13 09:31:46 +01:00
: Bindings::PlatformObject(realm)
, m_context(&context)
, m_handle(handle)
2024-11-13 09:31:46 +01:00
{
}
WebGLObject::~WebGLObject() = default;
void WebGLObject::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLObject);
}
void WebGLObject::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_context->gc_cell());
}
2024-11-13 09:31:46 +01:00
}