Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd multiple WebGL calls and improve error detection #6770
Conversation
hoppipolla-critic-bot
commented
Jul 25, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/5656 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
We'll likely impose a moratorium on new WebGL features until e10s (electrolysis, multiprocess Servo) lands. |
|
@Ms2ger yep, that's why I marked it as WIP and didn't take the time to resolve conflicts :P |
|
NB: e10s for WebGL has landed, so full speed ahead here! |
|
@bors-servo: r+ |
|
|
Add multiple WebGL calls and improve error detection Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land. Main TODOs are integration of tests, since it seems KhronosGroup/WebGL#1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback. I can't resolve conflicts right now because of time but I will do it soon. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6770) <!-- Reviewable:end -->
|
|
|
Arrg, forgot to update gleam with my local version. My fault, I'll do it ASAP. |
|
This is blocked until gleam is published to crates.io |
|
@glennw Can you publish a new gleam? Or do we have to wait for upstream? |
|
@metajack We are the upstream :) I've published 0.1.6 on crates.io. |
|
Once #6830 lands this should be mergeable :) |
|
@bors-servo retry This is ready to go now. |
Add multiple WebGL calls and improve error detection Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land. Main TODOs are integration of tests, since it seems KhronosGroup/WebGL#1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback. I can't resolve conflicts right now because of time but I will do it soon. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6770) <!-- Reviewable:end -->
|
|
|
|
cbc9ee1
to
aa85e28
|
Unbitrotted again, for some reason the S-needs-rebase flag didn't disappear (cc/ @jdm) |
|
I'll try to review this tomorrow. |
|
-S-awaiting-review +S-needs-code-changes Reviewed 3 of 3 files at r1, 12 of 12 files at r2. components/canvas/webgl_paint_task.rs, line 164 [r2] (raw file): components/script/dom/canvasrenderingcontext2d.rs, line 396 [r2] (raw file): components/script/dom/webglbuffer.rs, line 21 [r2] (raw file): components/script/dom/webglbuffer.rs, line 60 [r2] (raw file): components/script/dom/webglbuffer.rs, line 66 [r2] (raw file): components/script/dom/webglbuffer.rs, line 79 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 65 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 80 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 87 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 148 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 670 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 840 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 848 [r2] (raw file): components/script/dom/webglrenderingcontext.rs, line 936 [r2] (raw file): components/script/dom/webgltexture.rs, line 23 [r2] (raw file): components/script/dom/webgltexture.rs, line 63 [r2] (raw file): components/script/dom/webgltexture.rs, line 67 [r2] (raw file): components/script/dom/webgltexture.rs, line 87 [r2] (raw file): tests/ref/basic.list, line 380 [r2] (raw file): Comments from the review on Reviewable.io |
This commit implements WebGL's: * cullFace * frontFace * enable * disable * depthMask * colorMask * clearDepth * clearStencil * depthFunc * depthRange * hint * lineWidth * pixelStorei * polygonOffset * texParameteri * texParameterf * texImage2D (partially) It inlines a lot of OpenGL calls to keep the file `components/canvas/webgl_paint_task.rs` as small as possible while keeping readability. It also improves error detection on previous calls, and sets node damage on the canvas in the drawing calls. It adds a `TexImage2D` reftest, even though it's not enabled because: * WebGL paints the image when it loads (asynchronously), so the reftest doesn't wait for it and it finishes early * If we change the source for the base64 src of the image it works as expected in non-headless mode, but the test harness locks
|
@bors-servo: r+ Reviewed 10 of 10 files at r3. Comments from the review on Reviewable.io |
|
|
Add multiple WebGL calls and improve error detection Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land. Main TODOs are integration of tests, since it seems KhronosGroup/WebGL#1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback. I can't resolve conflicts right now because of time but I will do it soon. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6770) <!-- Reviewable:end -->
emilio commentedJul 25, 2015
Since it probably won't merge until multiprocess lands, I plan to use this PR to keep improving WebGL support until it can land.
Main TODOs are integration of tests, since it seems KhronosGroup/WebGL#1105 is going nowhere, adding missing calls and proper painting via native surfaces instead of readback.
I can't resolve conflicts right now because of time but I will do it soon.