mirror of
https://github.com/servo/servo.git
synced 2025-07-21 22:33:41 +01:00
webgl: Make a general way to get data from a JS array buffer view 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)`. r? @jdm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8970) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
canvas | ||
canvas_traits | ||
compositing | ||
devtools | ||
devtools_traits | ||
gfx | ||
gfx_traits | ||
layout | ||
layout_traits | ||
msg | ||
net | ||
net_traits | ||
plugins | ||
profile | ||
profile_traits | ||
script | ||
script_traits | ||
servo | ||
style | ||
style_traits | ||
util | ||
webdriver_server |