aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderingcontext.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add a check to BlendFunc for invalid constantioctaptceb2017-01-111-0/+33
| | | | combinations
* webgl: Add missing overload of bufferData().Eric Anholt2017-01-041-0/+32
| | | | | | | I was writing this to fix the error in gl-enum-tests.html test (it now gets farther along before it fails due to us missing getTexParameter()), but it turned out that a lot of the conformance tests were failing due to it.
* webgl: Allow enable/disable of STENCIL_TESTEric Anholt2017-01-041-1/+1
|
* webgl: Validate enums for blendEquation.Eric Anholt2016-12-311-0/+8
| | | | | Improves a conformance test that tried passing in desktop GL enums for blending.
* Remove and allow some dead code.Ms2ger2016-12-221-35/+0
|
* Remove HeapGCValueAnthony Ramine2016-12-121-15/+15
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Auto merge of #14075 - MortimerGoro:webgl-resize, r=MortimerGorobors-servo2016-12-011-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement WebGLContext resize <!-- Please describe your changes on the following line: --> Related PR: https://github.com/servo/webrender/pull/519 Implement WebGLContext resize (canvas.width & canvas.height). I have tested: - Fixes WebGL apps that initialize canvas size after calling canvas.getContext("webgl") - Support WebGL apps that change the canvas size & viewport on window.onresize --- <!-- 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. --> <!-- 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/14075) <!-- Reviewable:end -->
| * Implement WebGLContext resize, r=emilioImanol Fernandez2016-12-011-0/+24
| |
* | Expose WebGL-related interfaces only in WindowAnthony Ramine2016-11-301-13/+14
|/
* update depsGregory2016-11-221-9/+10
| | | | | | | | | | switch to using webrender_traits::ImageData update use of webrender_traits::StackingContext in layout use webrender_traits::channel::msg_channel in webgl ipc fix use of resource_override_path in components/servo/lib
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-75/+67
| | | | rebase + marked the necessary new code as unsafe
* webgl: Fix out-of-bounds readpixels handling.Eric Anholt2016-11-051-6/+105
| | | | | | | This fixes the crash in read-pixels-pack-alignment (which was trying to read out of bounds). Fixes #13901
* webgl: Throw an error on readPixels(width < 0 || height < 0)Eric Anholt2016-11-051-0/+4
| | | | | Otherwise gleam will try to allocate a negative size area for the result, and we'll panic with oom.
* webgl: Update FBO status when textures or RBs are reallocated.Eric Anholt2016-11-051-2/+11
| | | | | | FBO status is supposed to depend on the size of the attachments all matching, so we need to re-check when it changes. We don't ensure matching yet, but this will prevent regressions when we do.
* webgl: Detach RBs and textures from the bound FBO on deletion.Eric Anholt2016-10-251-0/+26
| | | | | | | This is part of general GL behavior: when an object is deleted, look through the currently bound objects and detach the deleted object from them. Detaching an object from an FBO causes it to need to be re-checked for its status.
* webgl: Add support for FBO attachments.Eric Anholt2016-10-251-0/+26
| | | | | This allows many FBO tests to start running as their framebuffers start coming back as framebuffer complete.
* webgl: Add support for renderbufferStorage().Eric Anholt2016-10-251-0/+33
| | | | | | | This is not a complete implementation yet: It doesn't clear the contents of the renderbuffer on creation. However, Gecko's plan to only clear renderbuffers when the first FBO using them is the simplest.
* webgl: Add support for checkFramebufferStatus().Eric Anholt2016-10-251-0/+17
| | | | | | For now it's returning the default UNSUPPORTED on user FBOs. object-deletion-behaviour.html starts running a bunch more subtets.
* webgl: Unbind deleted objects from the GL side, not just our side.Eric Anholt2016-10-251-8/+24
| | | | | | Once FBOs are allowed, we were running into testcases that deleted the active FBO, and expected the following ReadPixels to come from the default framebuffer.
* webgl: Throw an error when binding a deleted framebuffer.Eric Anholt2016-10-241-2/+12
| | | | | The spec was recently changed to clarify that this should throw an error.
* webgl: Allow TexImage data argument to be larger than necessary.Eric Anholt2016-10-231-3/+14
| | | | | | texture-size-limit.html is using a large array for all of its calls at various sizes, and we were throwing errors on the calls that should have passed.
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-2/+1
|
* webgl: Implement uniformMatrix*fv.Eric Anholt2016-10-091-0/+69
| | | | | | | | | | | | These new functions are derived from the existing uniform*fv functions. They get used in a lot of demo code, so it should greatly improve our compatibility. This regresses uniformMatrixBadArgs.html, which gets at an existing problem in our uniform matrix support (failure to validate that the uniform is a matrix before calling down) but previously just failed because it only called the 'fv' variants and never the existing 'f' variants.
* webgl: Honor ArrayBuffer or ArrayBufferView in bufferData and bufferSubData.Emilio Cobos Álvarez2016-10-091-4/+16
|
* webgl: Handle both sequences and typed arrays, managing the type error ↵Emilio Cobos Álvarez2016-10-091-169/+232
| | | | | | | | | | | | ourselves. This is a step with multiple intentions: * Be correct. * Unlock tests that are blocking @anholt. * Ease the transition to typed arrays once the changes by @Ms2ger start rolling in, since I expect the amount of test expectations to update to be non-trivial.
* script: Mark as unsafe multiple array_buffer_view_to_xxx functions that take ↵Emilio Cobos Álvarez2016-10-091-10/+22
| | | | a raw JSObject pointer.
* webgl: A few fixes regarding the nullability of WebGL parameters.Emilio Cobos Álvarez2016-10-091-62/+86
|
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-7/+7
|
* Make WebGLRenderingContext::new take a &GlobalScopeAnthony Ramine2016-10-061-7/+6
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-7/+7
|
* Introduce GlobalScope::constellation_chanAnthony Ramine2016-10-061-1/+1
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-9/+9
|
* Fix WebGL tests & Implement WebGLRenderingContext::{validateProgram, ↵Imanol Fernandez2016-10-031-22/+138
| | | | getProgramInfoLog, disableVertexAttribArray}, r=emilio
* implement WebGLRenderingContext::isEnabledOfek2016-09-221-16/+35
|
* 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.