Open
Bug 1428301
Opened 7 years ago
Updated 11 months ago
Put the generated webrender bindings into a wr_ffi namespace
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Core
Graphics: WebRender
Tracking
()
NEW
People
(Reporter: nical, Unassigned)
References
(Blocks 1 open bug)
Details
Every time I add a wrapper for a WebRender type (let's call it Foo), there is a head scratching phase where I have to figure out a new name for the wrapper type because the "mozilla::wr::Foo" names is already used by the generated bindings.
It'd be nice if the generated binding would be "mozilla::wr_ffi::Foo" so that the wrapper can be written like this:
> namespace wr (
> class Foo {
> // ...
> wr_ffi::Foo* mFoo;
> };
> }
A few examples of types tha we had to rename (rust -> c++)
- Api -> WebRenderAPI
- Renderer -> RendererOGL
- ResourceUpdates -> ResourceUpdateQueue
- Vec_u8 -> ByteBuffer
- Transaction -> ? (not quite sure yet)
The ffi types that we want to use as is (typically enums) can be reexported in the wr namespace.
Objections?
Reporter | ||
Comment 1•7 years ago
|
||
Alternative solution, Ryan is adding a feature in cbindgen to generate the types with a different name.
> |15:05 rhunt| nical: so I added a feature last night to cbindgen that may do what you were asking
> |15:06 rhunt| nical: [export.rename] "Foo" = "WrFoo" will rename all references to Foo in the generated bindings
Updated•7 years ago
|
Blocks: stage-wr-year
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
Updated•11 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•