Remove the concept of "native_methods" in the generators

This was used to make the distinction between native-only methods that
were those manipulating "natively defined" types, and the rest. Now that
all "natively defined" objects are "callback" instead this name didn't
make sense.

The only relevant thing is that in C there are the Reference and Release
methods that don't appear in dawn.json and shouldn't be exposed on C++
objects. Hence most of the native_methods() calls in the templates are
updated to be c_methods() calls except for the webgpu_cpp templates that
use type.methods directly.

BUG=dawn:22

Change-Id: I65c160b8b8a829e4728862c65bc67268a46f445e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13902
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Corentin Wallez
2019-11-22 14:02:52 +00:00
committed by Commit Bot service account
parent 540ababb6b
commit aca8c4a528
11 changed files with 31 additions and 46 deletions

View File

@@ -102,7 +102,7 @@ namespace wgpu {
)
{%- endmacro %}
{% for method in native_methods(type) %}
{% for method in type.methods %}
{{render_cpp_method_declaration(type, method)}} {
{% if method.return_type.name.concatcase() == "void" %}
{{render_cpp_to_c_method_call(type, method)}};