This allows keeping the VertexAttrib* calls asynchronous.
Another option would be to do the validation in the apply() function,
but that'd require us passing an unnecessary channel around and add
extra synchronization.
The counterpart of this is that it has to be updated when the context
changes, but that's less problem.
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
I was going to implement Uniform4fv with sequences, (since it
practically implemented), but we can't until we support Float32Array
args because codegen doesn't know how tu differenciate between both.
This fixes an invalid length being reported from
float32_array_to_slice (which used the byte length), and also to
generalize getting data from a JS array buffer view, to reduce code
duplication.
The pending type safety issues, like where we could send a UInt16Array
where we expect a Float32 one, should be solved by IDL bindings in
some cases, like uniform[n]fv or vertexAttrib[n]fv, and with extra
checks in others, like in the pending texImage2D(..., ArrayBufferView).
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.