mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb/WebGL: Track the shaders attached to a program
This is required to return original references to the shaders attached to a program from getAttachedShaders. This is required for Figma (and likely all other Emscripten compiled applications that use WebGL) to get it's own generated shader IDs from the shaders returned from getAttachedShaders.
This commit is contained in:
committed by
Andreas Kling
parent
3ab93667f5
commit
aa99853a5c
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* 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>
|
||||
* Copyright (c) 2024-2025, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/WebGLProgramPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||
#include <LibWeb/WebGL/WebGLShader.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
@@ -33,4 +34,11 @@ void WebGLProgram::initialize(JS::Realm& realm)
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLProgram);
|
||||
}
|
||||
|
||||
void WebGLProgram::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_attached_vertex_shader);
|
||||
visitor.visit(m_attached_fragment_shader);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user