dawn-cmake/generator/templates/dawn_wire/client
Corentin Wallez 00d6215be9 dawn_wire/client: Add ToAPI and FromAPI helpers.
In the client code, we often need to translate between WGPUObject (the
API type) to Object* (the internal client type). This added a bunch of
reinterpret_casts that make the code less readable and more fragile.

This CL adds FromAPI and ToAPI helpers in the autogenerated
ApiObjects_autogen.h header, that convert between API and internal types
in a type-safe way.

Bug: dawn:445

Change-Id: Ia1bf624f0315ced496b95cb660adf88abd916d71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24063
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-06-30 18:39:50 +00:00
..
ApiObjects.h dawn_wire/client: Add ToAPI and FromAPI helpers. 2020-06-30 18:39:50 +00:00
ApiProcs.cpp dawn_wire: Remove client/ApiProcs_autogen.h 2020-06-30 18:26:30 +00:00
ClientBase.h Make the wire Client own ObjectAllocators and CommandSerializer 2019-01-30 02:31:37 +00:00
ClientHandlers.cpp Cleanup: Rename dawn_wire Object "serial" to "generation" 2020-04-13 17:50:51 +00:00
ClientPrototypes.inc dawn_wire: Tag deserialize commands with volatile pointer 2019-10-07 20:38:47 +00:00