mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
LibWeb/WebGL: Don't treat WebGLUniformLocation as WebGLObject
...in code generator. `is_webgl_object_type()` is only supposed to return true for objects inheriting from WebGLObject.
This commit is contained in:
parent
cf730870c5
commit
fbae24f7a9
Notes:
github-actions[bot]
2024-12-19 12:39:42 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/fbae24f7a9b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2965
1 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,6 @@ static bool is_webgl_object_type(StringView type_name)
|
|||
|| type_name == "WebGLSampler"sv
|
||||
|| type_name == "WebGLShader"sv
|
||||
|| type_name == "WebGLTexture"sv
|
||||
|| type_name == "WebGLUniformLocation"sv
|
||||
|| type_name == "WebGLVertexArrayObject"sv;
|
||||
}
|
||||
|
||||
|
@ -1064,6 +1063,10 @@ public:
|
|||
gl_call_arguments.append(ByteString::formatted("{} ? {}->handle() : 0", parameter_name, parameter_name));
|
||||
continue;
|
||||
}
|
||||
if (parameter.type->name() == "WebGLUniformLocation"sv) {
|
||||
gl_call_arguments.append(ByteString::formatted("{} ? {}->handle() : 0", parameter_name, parameter_name));
|
||||
continue;
|
||||
}
|
||||
if (parameter.type->name() == "WebGLSync"sv) {
|
||||
// FIXME: Remove the GLsync cast once sync_handle actually returns the proper GLsync type.
|
||||
gl_call_arguments.append(ByteString::formatted("(GLsync)({} ? {}->sync_handle() : nullptr)", parameter_name, parameter_name));
|
||||
|
|
Loading…
Add table
Reference in a new issue