aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderingcontext.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* webgl: Do validation that the framebuffer is complete for FBO operations.Eric Anholt2016-09-211-0/+56
| | | | | Given that we can't make a complete FBO yet, just return false from the status check.
* webgl: Don't forget update WebGL's texture binding on unbind.Eric Anholt2016-09-211-0/+1
| | | | | This doesn't appear to fix any testcases, but I noticed it when fixing renderbuffers.
* webgl: Don't forget to update the WebGL context's RB binding.Eric Anholt2016-09-211-1/+3
| | | | | We need to track the RB in the DOM context for getParameter(gl.RENDERBUFFER_BINDING), among others.
* webgl: Update the match for WebGLError's new InvalidFramebufferOperation.Eric Anholt2016-09-211-0/+1
|
* Reorder `use` statementsUK9922016-09-091-5/+5
|
* Compile WebIDL return type "object" to NonZero<*mut JSObject>Anthony Ramine2016-08-301-2/+4
|
* Don't bother with the global in ImageData::get_image_dataAnthony Ramine2016-08-301-2/+1
|
* Auto merge of #13102 - anholt:webgl-is-program, r=emiliobors-servo2016-08-281-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Add isProgram() support. <!-- Please describe your changes on the following line: --> webgl: Add isProgram() support. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> There's one failure still, where a deleted program should still be considered to be a program until it's unbound. However, I recently made it so that we unbind at delete time, and we may need to partially back that change out. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13102) <!-- Reviewable:end -->
| * webgl: Add isProgram() support.Eric Anholt2016-08-281-0/+5
| | | | | | | | | | | | | | There's one failure still, where a deleted program should still be considered to be a program until it's unbound. However, I recently made it so that we unbind at delete time, and we may need to partially back that change out.
* | Auto merge of #13060 - anholt:webgl-invalid-passed-params, r=emiliobors-servo2016-08-281-0/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Do validation of glScissor/glViewport(width, height) on the DOM side <!-- Please describe your changes on the following line: --> webgl: Do validation of glScissor/glViewport(width, height) on the DOM side --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Avoids testcase CRASHes due to unexpected GL errors. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13060) <!-- Reviewable:end -->
| * webgl: Do validation of glScissor/glViewport(width, height) on the DOM side.Eric Anholt2016-08-261-0/+8
| | | | | | | | Avoids testcase CRASHes due to unexpected GL errors.
* | webgl: Add getters for other GL_*_BINDING enums.Eric Anholt2016-08-261-11/+31
| | | | | | | | Fixes many subcases of object-deletion-behaviour.html.
* | webgl: Remove objects from binding points on object deletion.Eric Anholt2016-08-261-5/+24
| | | | | | | | | | | | We keep bindings that shadow what's mapped in the GL state currently, and so we need to remove the objects from our binding points when they get implicitly removed from the GL binding points during object deletion.
* | webgl: Protect against GL error on glBindRenderbuffer(deleted rbo).Eric Anholt2016-08-261-7/+13
|/ | | | | | | | | | On a GLES or compatibility underlying GL context, we were fine because an underlying renderbuffer object would just get re-created, and nothing too bad happened because we aren't tracking the currently bound renderbuffer at the DOM level. However, on a desktop GL core context, binding non-genned or deleted names is an error. Fixes a crash in object-deletion-behavior.html.
* webgl: Fix validation of drawElements()'s type argument.Eric Anholt2016-08-261-3/+5
| | | | Fixes crash due to unexpected GL errors in gl-drawelements.html.
* webgl: Add support for getParameter(GL_FRAMEBUFFER_BINDING).Eric Anholt2016-08-141-0/+24
| | | | | | | | To do this, we need to keep a map of GL names (encapsulated as WebGLFramebufferId) to WebGLFramebuffer objects so that we can return the right type. Fixes #12852
* webgl: Fix a typo in VertexAttrib1fv handling.Eric Anholt2016-08-131-1/+1
| | | | | | The VertexAttrib[234]fv compare to the same size as in their function name. This wasn't noticed becacuse this function isn't connected from the .webidl yet.
* webgl: Validate that depthRange near <= far.Eric Anholt2016-08-101-0/+9
| | | | Fixes a subtest of webgl-specific.html.
* Auto merge of #12224 - nox:die-util-die, r=Ms2gerbors-servo2016-07-041-2/+1
|\ | | | | | | | | | | | | | | Remove some stuff from util <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12224) <!-- Reviewable:end -->
| * Move util::vec::byte_swap to canvas_traitsAnthony Ramine2016-07-041-2/+1
| |
* | Switch to using the new rooted!/RootedGuard API for rooting.Eduard Burtescu2016-07-041-7/+7
|/
* Use wrappers for GL IDsAnthony Ramine2016-06-281-3/+3
| | | | See https://github.com/servo/webrender_traits/pull/62.
* webgl: Refactor texture validations to take advantage of rust type systemEmilio Cobos Álvarez2016-06-251-395/+196
| | | | | | | | | | | | | This commit introduces the `WebGLValidator` trait, and uses it for multiple validations in the texture-related WebGL code, to move that logic out of the already bloated `webglrenderingcontext.rs` file. It also creates a type-safe wrapper for some WebGL types, removing all the `unreachable!`s there, and introduces a macro for generating them conveniently. This partially addresses #10693, pending refactor more code to use this infrastructure, and (possibly?) introducing an `AsGLError` trait for the errors to make the error handling happen in `WebGLContext`.
* Implement texSubImage2D APIDaosheng Mu2016-06-101-103/+300
|
* Auto merge of #11426 - DDEFISHER:master, r=emiliobors-servo2016-05-291-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes fix #11357 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11426) <!-- Reviewable:end -->
| * Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContextDaniel2016-05-291-0/+15
| |
* | Auto merge of #11329 - c-rhodes:11320, r=jdmbors-servo2016-05-271-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report use statements that use {} with only one entry Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [X ] `./mach build -d` does not report any errors - [X ] `./mach test-tidy --faster` does not report any errors - [X ] These changes fix #11320 (github issue number if applicable). Either: - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11329) <!-- Reviewable:end -->
| * | Report use statements that use {} with only one entryCullen Rhodes2016-05-271-1/+1
| |/
* / add log2(u32) and use it to prevent casting to and from float to intKosov Eugene2016-05-271-1/+5
|/
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Auto merge of #11147 - danlrobertson:webgl-tex, r=emiliobors-servo2016-05-231-95/+227
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impl copyTexImage2D and copyTexSubImage2D - [X] `./mach build` does not report any errors - [X] `./mach test-tidy` does not report any errors - [x] There are tests for these changes Implement copyTexImage2D and copyTexSubImage2D for WebGLRenderingContext. Feedback would be appreciated. I did my best to follow the [spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). Please let me know if I missed anything. I couldn't find tests for this. Let me know if I should create one. I'm more than happy to do so. As always any feedback, comments,or critiques are very welcome :smile: Part of #10209 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11147) <!-- Reviewable:end -->
| * Impl copyTexImage2D and copyTexSubImage2DDaniel Robertson2016-05-231-95/+227
| | | | | | | | | | Implement copyTexImage2D and copyTexSubImage2D for WebGLRenderingContext.
* | Implement SampleCoverageDavid Zbarsky2016-05-221-0/+5
|/
* Remove ConstellationChan.Ms2ger2016-05-191-2/+1
| | | | | | It's a pointless abstraction that propagates the obsolete chan terminology, swaps the order in which the sender and receiver are returned, and hides a source of panics.
* Auto merge of #10776 - dzbarsky:getVertexAttrib, r=emiliobors-servo2016-05-181-0/+39
|\ | | | | | | | | | | | | | | Implement GetVertexAttrib <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10776) <!-- Reviewable:end -->
| * Implement GetVertexAttribDavid Zbarsky2016-05-121-0/+39
| |
* | Implement ReadPixelsDavid Zbarsky2016-05-121-8/+34
|/
* Implement IsShader fn and IsTexture fn for WebGLRenderingContextDaniel2016-05-091-0/+10
|
* compositing: Send mouse events to the right pipeline when usingPatrick Walton2016-05-041-0/+8
| | | | | | | | WebRender. Fixes mouse events in browser.html. Requires servo/webrender_traits#47 and servo/webrender#272.
* Implement stencil fns for WebGLRenderingContextKeith Yeung2016-04-241-3/+87
|
* Auto merge of #10443 - emilio:webgl-teximage2d-overload, r=jdmbors-servo2016-04-221-99/+397
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webgl: Implement the pending texImage2D overload, and add more validation This is a large-ish refactor of the Texture2D code, but it should be easier to read and of course more correct. I tried to annotate every error condition with a spec paragraph. I made just a reftest to ensure this works as intended, since I expect #10373 to land pretty soon. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10443) <!-- Reviewable:end -->
| * webgl: Fix a few typos in commentsEmilio Cobos Álvarez2016-04-201-2/+2
| |
| * webgl: texture: Make initialize only mark as initialized the current faceEmilio Cobos Álvarez2016-04-201-1/+2
| | | | | | | | | | Also refactor a bit the code, and remove the unused `is_initialized` flag.
| * webgl: Fix filling a non-zero levelEmilio Cobos Álvarez2016-04-201-8/+7
| | | | | | | | | | You can fill a level > 0 as long as the width and height values are power of two, so the previous test was bogus.
| * webgl: Reset bound buffer when appropiate in BufferDataEmilio Cobos Álvarez2016-04-201-2/+7
| | | | | | | | This makes the test bufferDataBadArgs pass appropiately.
| * webgl: Rename UniformType to UniformSetterType and hoist to the bottomEmilio Cobos Álvarez2016-04-191-76/+98
| |
| * webgl: Remove active_uniform related validation.Emilio Cobos Álvarez2016-04-191-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | It's broken for uniform arrays, since uniform.id() stops being the index then. We need to add a more complex integration with angle for this to ever be correct. Unfortunately the ANGLE part that we should touch is C++, and it has destructors, so we need to hook destructors there, and I can't do it right now.
| * webgl: Validate that the texture should be power of two if the level isEmilio Cobos Álvarez2016-04-191-4/+14
| | | | | | | | greater than 1
| * webgl: Implement the pending texImage2D overload, and add more validationEmilio Cobos Álvarez2016-04-191-29/+284
| | | | | | | | | | | | | | This is a large-ish refactor of the Texture2D code, but it should be easier to read and of course more correct. I tried to annotate every error condition with a spec paragraph.
* | Prevent use of reserved names in BindAttribLocationDavid Zbarsky2016-04-171-6/+4
|/