servo / sparkle

GL bindings for Servo's WebGL implementation (alternative to the `gleam` crate)
7 stars 5 forks source link

Add support fo calling read pixels with pixel pack buffer as target #14

Closed mmatyas closed 4 years ago

mmatyas commented 4 years ago

This adds support for calling ReadPixels with a raw byte offset with the intention of reading into a bound pixel buffer object.

mmatyas commented 4 years ago

Ok, updated.

nox commented 4 years ago

That method is unsound and can make the GL system write to buffer_byte_offset as *mut _, which is not guaranteed to be a valid address (obviously, it's not even a pointer to begin with).

jdm commented 4 years ago

https://github.com/servo/sparkle/commit/9de6e1872509847dc124388f28b97cbf71778e0f addresses the unsoundness by making the method unsafe and adding useful documentation.