00d6215be9
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> |
||
---|---|---|
.. | ||
dawn_native | ||
dawn_wire | ||
opengl | ||
dawn_proc.c | ||
dawn_proc_table.h | ||
library_webgpu_enum_tables.js | ||
mock_webgpu.cpp | ||
mock_webgpu.h | ||
webgpu.h | ||
webgpu_cpp.cpp | ||
webgpu_cpp.h | ||
webgpu_struct_info.json |