servo/components/script
bors-servo e4b620ea54 Auto merge of #5652 - dmarcos:webgl, r=jdm
@jdm @ecoal95 I'm working on making VR happen in the Browser and I want to bring to Servo the [webVR APIs](https://github.com/MozVR/webvr-spec/blob/master/webvr.idl) we already have in Gecko. Before anything happens we need a working implementation of WebGL (and also the [fullscreen API](https://fullscreen.spec.whatwg.org/)). My implementation is very basic and probably naive (I just recently started to contribute to Servo). My patch is just a starting point: 

- It only implements ```clearColor``` and ```clear``` methods of the [WebGL spec](https://www.khronos.org/registry/webgl/specs/latest/).
- It uses the readback strategy that ```canvasRenderingContext2D``` is using (The webgl task paints stuff independently on it's own buffer and the compositor task request the pixels back to the webgl task when it needs them) I'm sure there are much better ways to handle this. Latency and FPS are critical in VR so we have to figure out the fastest way to push pixels to the screen. I've read something about layerizing the canvas but I'm still not sure what that even means :)
- There's an included test you can try ```./mach run tests/ref/webgl-context/clearcolor.html``` 

@ecoal95 I know you'll be working on this for the next three months. With a foundation in place we will be able to make quick progress in parallel. This is exciting!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5652)
<!-- Reviewable:end -->
2015-04-20 19:29:02 -05:00
..
dom Kicks off a WebGL implementation 2015-04-20 14:29:39 -07:00
parse Change parse_progress() take JSRef by value. [Issue#5738] 2015-04-19 11:24:45 -07:00
build.rs Fix build scripts warnings. 2015-03-18 21:53:48 +01:00
Cargo.toml Implements drawImage for html image as ImageSource 2015-04-07 11:02:50 -07:00
cors.rs Create easy common interface for off-thread network listeners, and remove the CORS-specific reimplementation of async networking. 2015-04-16 11:46:41 -04:00
devtools.rs Firefox timeline integration #4957 2015-04-13 21:08:07 +07:00
layout_interface.rs Animate many more CSS properties 2015-04-16 17:42:57 +01:00
lib.rs Create easy common interface for off-thread network listeners, and remove the CORS-specific reimplementation of async networking. 2015-04-16 11:46:41 -04:00
makefile.cargo Cargoify servo 2014-09-08 20:21:42 -06:00
network_listener.rs Create easy common interface for off-thread network listeners, and remove the CORS-specific reimplementation of async networking. 2015-04-16 11:46:41 -04:00
page.rs Use Page::window_for_script_deallocation in ScriptMemoryFailsafe 2015-04-12 17:38:38 -04:00
script_task.rs Make ScriptTask::js_context immutable. 2015-04-20 20:16:55 +02:00
textinput.rs Move script crate unit tests into the unit_tests crate. 2015-04-08 01:07:53 +02:00
timers.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00