[dawn][headers] Partial revert of https://dawn-review.googlesource.com/c/dawn/+/230934
- Because the ordering of structs are different than those upstream,
we need to keep the `struct` prefixes in some places to avoid
breaking our WASM builds at the moment.
Bug: 378865841
Change-Id: Iec3f874e470231120b0630a7d50c0f7310932694
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/231677
Commit-Queue: Loko Kung <lokokung@google.com>
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/generator/templates/api.h b/generator/templates/api.h
index afbd502..c6586ff 100644
--- a/generator/templates/api.h
+++ b/generator/templates/api.h
@@ -148,7 +148,7 @@
{% for type in by_category["callback function"] %}
typedef {{as_cType(type.return_type.name)}} (*{{as_cType(type.name)}})(
{%- for arg in type.arguments -%}
- {{as_annotated_cType(arg)}}{{", "}}
+ {% if arg.type.category == "structure" %}struct {% endif %}{{as_annotated_cType(arg)}}{{", "}}
{%- endfor -%}
{{API}}_NULLABLE void* userdata1, {{API}}_NULLABLE void* userdata2) {{API}}_FUNCTION_ATTRIBUTE;
{% endfor %}