Commit graph

111 commits

Author SHA1 Message Date
Glenn Watson
208596903e servo: Merge #14286 - Update to webrender 0.10.0 (from gterzian:update_canvas_with_offscreen_context); r=jdm
<!-- Please describe your changes on the following line: -->

Changes necessary to build servor with webrender 0.10.0

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e1eff691f8a1d8c9c7ab33344364f0419626b80e
2016-11-24 12:29:52 -08:00
Abelardo E. Mendoza
7269bcf046 servo: Merge #14096 - 11485 make dom methods taking mut js content unsafe (from fflorent:11485-make-dom-methods-taking-mut-JSContent-unsafe); r=nox
This is a rebased version of PR #11595

---
<!-- 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
- [x] These changes fix #11485

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: no code logic was changed

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f70fc6644ddb142627c188ebbde2cc0a0282f9b4
2016-11-17 02:44:54 -06:00
Eric Anholt
ebe823e990 servo: Merge #14081 - webgl: out-of-bounds readPixels() fixes (from anholt:webgl-readpix-negative-width); r=emilio
<!-- Please describe your changes on the following line: -->
Fix crashes in two WebGL readPixels() tests by adding framebuffer size validation.

---
<!-- 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
- [X] These changes fix #13901

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 2601d8eb8b5988f1f72a2449b904a75f5dab0c59
2016-11-09 10:03:42 -06:00
Eric Anholt
bf218ec238 servo: Merge #13872 - webgl: Add basic support for framebuffer attachments (from anholt:webgl-fbo); r=emilio
This is by no means a complete implementation, but I've slowed down on working on it, so I think we should look at what it takes to merge the current code.  There are some major features missing, like initializing renderbuffers to 0 (uninitialized memory leak), tracking the attachments' attributes (width/height/format) for parameter requests, and lots of missing glCheckFramebufferStatus() validation.  On the other hand, this is enough to run some demos using FBOs.

---
<!-- 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
- [X] These changes fix #13639 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: fbec79e920c0b0ddeaeeb6c0cc97b20ad85729e0
2016-10-27 21:39:15 -05:00
Eric Anholt
cd7abec72d servo: Merge #13898 - webgl: texture size validation fixes (from anholt:webgl-texture-fixes); r=emilio
<!-- Please describe your changes on the following line: -->
This pull request fixes the errors in texture-size-limit.html.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f3973a0d3b2d12c96d0f21624fd0d6d925f34abb
2016-10-24 00:52:57 -05:00
Anthony Ramine
cf69fd522f servo: Merge #13647 - Unify all rooting traits under RootedReference (from nox:rootedreference); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: cf2a6475cb3d7d98b925e7a235ebf36f6abe883d
2016-10-11 17:00:55 -05:00
Eric Anholt
364e976b00 servo: Merge #13665 - webgl: Implement uniformMatrix*fv (from anholt:webgl-uniform-matrix-v); r=emilio
<!-- Please describe your changes on the following line: -->

---
<!-- 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. -->

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.

Source-Repo: https://github.com/servo/servo
Source-Revision: aab9d61025fe72bdcb37f13c9cc53b787a636036
2016-10-10 03:15:10 -05:00
Emilio Cobos Álvarez
fe65f0f44d servo: Merge #13305 - WebGL IDL and correctness (from emilio:webgl-idl); r=nox,KiChjang
<!-- Please describe your changes on the following line: -->
---
<!-- 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

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This is a change set 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.

I expect having it to run on try a few times, but... r? @nox or @KiChjang

Source-Repo: https://github.com/servo/servo
Source-Revision: ddff5ce2eb635ff1c51ed7fee2d33e890c541221
2016-10-09 06:26:06 -05:00
Anthony Ramine
b95407a112 servo: Merge #13596 - Get rid of dom::bindings::global (from nox:inline); r=Ms2ger
Globals in that PR are now represented by the fake IDL interface `GlobalScope`.

Source-Repo: https://github.com/servo/servo
Source-Revision: a6e4b5bb86ad707a0863acff87344ca4239cfd2c

--HG--
rename : servo/components/script/dom/webidls/ServoXMLParser.webidl => servo/components/script/dom/webidls/GlobalScope.webidl
2016-10-07 07:52:09 -05:00
Imanol Fernandez
fa1ea9c973 servo: Merge #13208 - Fix WebGL tests & Implement WebGLRenderingContext::{validateProgram, getProgramInfoLog, disableVertexAttribArray} (from MortimerGoro:programinfolog); r=emilio
<!-- Please describe your changes on the following line: -->
Implement WebGLRenderingContext::{validateProgram, getProgramInfoLog} and improve WebGL testcase to show shader link and validation errors.

---
<!-- 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
- [X] These changes fix #13199 (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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: fc251384a76547167c027d69c28deae8c410c626
2016-10-03 16:54:51 -05:00
Ofek
975aea7d1e servo: Merge #13337 - Implement WebGLRenderingContext::isEnabled (from ofekd:implement-webgl-isEnabled); r=emilio
Implemented WebGLRenderingContext::isEnabled

- Please note the return value of the implementation, not sure about returning `false` on `InvalidEnum`.
- the `webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html` wpt test is disabled on linux but was enabled on my machine and run to validate expectations.
- the `/webgl/conformance-1.0.3/conformance/context/methods.html` test is disabled everywhere. Enabling and running on my machine showed incorrect expectations beyond `isEnabled`. The test was temporarily edited to test just for `isEnabled` and it ran successfully.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13040

- [X] There are tests for these changes (please read details above)
- [ ] These changes do not require tests because _____

Source-Repo: https://github.com/servo/servo
Source-Revision: f09595e8af6cd480238d29559579434d94f868cc
2016-09-22 11:05:55 -05:00
Glenn Watson
93c1ffc0ec servo: Merge #13309 - webgl: FBO support preparation (from anholt:webgl-fbo-prep); r=emilio
<!-- Please describe your changes on the following line: -->
Sending this PR now so that we can get the webrender patches merged.  This is prep for the webgl-fbo series, with one small fix for some conformance tests.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 7c0dfd07ad5149406b389ca893d51f6fa442e98e
2016-09-20 19:19:21 -05:00
UK992
f8cb9971b7 servo: Merge #13205 - Tidy: Fix ordering use statements with braces (from UK992:tidy-sort); r=Wafflespeanut
This hack fixes https://github.com/servo/servo/issues/7412 and matches behavior with rustfmt.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3117787fd2a8b7748cfde1e9b8c5be3c00f2c599
2016-09-08 22:19:19 -05:00
Anthony Ramine
1c0d09c584 servo: Merge #13100 - Use Option<T> to return from getters (from nox:better-getters); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3649a356c8ddd04d3beebff9978b1bffa407c307
2016-08-31 04:10:42 -05:00
Eric Anholt
e6de2536bf servo: Merge #13102 - webgl: Add isProgram() support (from anholt:webgl-is-program); r=emilio
<!-- 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.

Source-Repo: https://github.com/servo/servo
Source-Revision: d37d4d697ae8c8897384213be82f25a51a4aa835
2016-08-28 21:23:59 -05:00
Eric Anholt
4c169f0d81 servo: Merge #13060 - webgl: Do validation of glScissor/glViewport(width, height) on the DOM side (from anholt:webgl-invalid-passed-params); r=emilio
<!-- 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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 11e8e42fd855c1078364c70926dfb1c888bdb7bb
2016-08-28 20:10:47 -05:00
Eric Anholt
daa29f2156 servo: Merge #12934 - webgl: object deletion and bindings (from anholt:webgl-deletion-and-bindings); r=emilio
<!-- Please describe your changes on the following line: -->
This PR brings in some fixes to the wpt object-deletion-and-behaviour.html testcase.

The test still has many failures, but some of the things that were really getting in the way are fixed.

---
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 969aefe01f347060c10e0729e3429113018e4ed1
2016-08-27 00:05:54 -05:00
Eric Anholt
12e38a2dba servo: Merge #13052 - webgl: Fix validation of drawElements()'s type argument (from anholt:webgl-drawelements-types); r=nox
<!-- Please describe your changes on the following line: -->
webgl: Fix validation of drawElements()'s type argument.

---
<!-- 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. -->

Fixes crash due to unexpected GL errors in gl-drawelements.html.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3b11c5ea2d3d6e68d4f9609e5e2a81056bfb27d0
2016-08-26 06:24:39 -05:00
Eric Anholt
c788046d08 servo: Merge #12857 - Implement GL_FRAMEBUFFER_BINDING (and fix a VertexAttrib1fv typo) (from anholt:webgl-framebuffer-binding-2); r=emilio
<!-- Please describe your changes on the following line: -->
This PR fixes many webgl conformance test failures due to missing support for a getParameter() call in the webgl test utils.

---
<!-- 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
- [X] These changes fix #12852

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 8472699885fe81957dc9d183c209f3aa31f4c4c2
2016-08-14 04:46:17 -05:00
Eric Anholt
20d4a31940 servo: Merge #12794 - webgl: Validate that depthRange near <= far (from anholt:webgl-depthrange-validate); r=emilio
<!-- Please describe your changes on the following line: -->

Add a check for one of the subcases of webgl-specific.html.

I added a longer comment citing the spec than is common in the file -- we've found these kinds of citations really useful in Mesa, but if we want to keep it to the spec link, I could change it.

---
<!-- 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. -->

Fixes a subtest of webgl-specific.html.

Source-Repo: https://github.com/servo/servo
Source-Revision: f2b861fb24e2322d21c1a990ef25e49d2965b0ce
2016-08-10 05:40:19 -05:00
Anthony Ramine
cc183b15a7 servo: Merge #12224 - Remove some stuff from util (from nox:die-util-die); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3b0dadda529a5ba45a8a0dc394187f43a66e7c1f

--HG--
rename : servo/components/util/print_tree.rs => servo/components/gfx_traits/print_tree.rs
rename : servo/components/util/workqueue.rs => servo/components/style/workqueue.rs
2016-07-04 12:57:00 -07:00
Eduard Burtescu
da092febcb servo: Merge #11872 - Replace return_address usage for rooting with stack guards and convenience macros (from eddyb:back-to-roots); r=Ms2ger
The existing `Rooted` and `RootedVec` users were migrated the the following two macros:
```rust
let x = Rooted::new(cx, value);
// Was changed to:
rooted!(in(cx) let x = value);
// Which expands to:
let mut __root = Rooted::new_unrooted(value);
let x = RootedGuard::new(cx, &mut __root);
```
```rust
let mut v = RootedVec::new();
v.extend(iterator);
// Was changed to:
rooted_vec!(let v <- iterator);
// Which expands to:
let mut __root = RootableVec::new();
let v = RootedVec::new(&mut __root, iterator);
```

The `rooted!` macro depends on servo/rust-mozjs#272.
These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`.

Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10.

Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway.
`RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT.

By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix rust-lang/rust#34227
- [x] These changes do not require tests because they are not functional changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 80cb0cf8214fd52d2884724614c40cb278ee7575
2016-07-04 11:03:35 -07:00
Anthony Ramine
82df62fcd8 servo: Merge #11892 - Use wrappers for GL IDs (from nox:webgl-wrappers); r=emilio
See https://github.com/servo/webrender_traits/pull/62.

Source-Repo: https://github.com/servo/servo
Source-Revision: dca85ae98d620723eb7466615d11a032c58d5ca3
2016-06-28 13:13:44 -05:00
Emilio Cobos Álvarez
3100c8274d servo: Merge #11724 - webgl: Refactor texture validations to take advantage of rust type system (from emilio:webgl-refactor); r=jdm
<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because refactoring.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

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`.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 80680764562bd4a46bd72a426b8157d59f6a6fd0
2016-06-25 15:16:48 -05:00
Daosheng Mu
9a01da77bb servo: Merge #11168 - Implement WebGL TexSubImage2D (from daoshengmu:texSubImage2D); r=emilio
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:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because I have run the wpt test of texSubImage2D.html, and it works.

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

I have implemented ```TexSubImage2D``` follow [the spec](https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8). This is my first version of implementation, and I notice I can reuse the code from ```TexImage2D```. Therefore, I would like to discuss make ```validate_tex_image2D_from_buffer``` and ```validate_tex_image2D_from_source``` to remove duplicate code.

Part of #10209

Source-Repo: https://github.com/servo/servo
Source-Revision: 5e8ab6c0ff3eb8504c977f16dfc9507e36853e71
2016-06-09 19:49:08 -05:00
Daniel
95d70551db servo: Merge #11426 - Implement IsBuffer, IsFramebuffer and IsRenderbuffer for WebGLRenderingContext (from DDEFISHER:master); r=emilio
- [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

Source-Repo: https://github.com/servo/servo
Source-Revision: b11648903bb07a31ec93f3030058ed41b3472b17
2016-05-29 20:03:56 -05:00
Cullen Rhodes
2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Kosov Eugene
0960027607 servo: Merge #11458 - add log2(u32) and use it to prevent casting to and from float to int (from kevgs:log2); r=Manishearth
<!-- Please describe your changes on the following line: -->
PR for #11440
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f2f2987e74e23bbb01549e6c06ab71513692d9ab
2016-05-27 03:56:51 -05:00
Anthony Ramine
5aa3cb5ed3 servo: Merge #11326 - Move DOMString back to script (from nox:non-geckolib); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6abcd793d780369767385b01b02ee725d6b10585
2016-05-24 02:07:29 -07:00
Daniel Robertson
7fba47fcab servo: Merge #11147 - Impl copyTexImage2D and copyTexSubImage2D (from danlrobertson:webgl-tex); r=emilio
- [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 😄

Part of #10209

Source-Repo: https://github.com/servo/servo
Source-Revision: 846517342b8c72da483318b5260e74ad8de35f86
2016-05-23 20:07:52 -07:00
David Zbarsky
5213796900 servo: Merge #11324 - Implement SampleCoverage (from dzbarsky:sample_coverage); r=nox
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
- [ ] `./mach test-tidy --faster` 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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5454cfb36967a81681389df78eb06653d6367a60
2016-05-23 16:52:28 -07:00
Ms2ger
c69abc638b servo: Merge #11270 - Remove ConstellationChan (from servo:ConstellationChan); r=asajeffrey
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
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] 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.

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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27c25e859a45c3d79c85e96b85ec5226a3231e10
2016-05-19 12:38:26 -07:00
David Zbarsky
ad975caa5a servo: Merge #10776 - Implement GetVertexAttrib (from dzbarsky:getVertexAttrib); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: fe116b4bd70def7beb22ca7264476e3ab0f5932c
2016-05-18 14:40:32 -07:00
David Zbarsky
a4eeafae15 servo: Merge #10668 - Implement WebGLRenderingContextBase::readPixels() (from dzbarsky:read_pixels); r=emilio
@emilio
Anything obviously wrong stick out to you? Haven't had a chance to debug why tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html and co. get the wrong results from ReadPixels.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7bede60272a79fe094ea81979044b4d6eceeada4
2016-05-14 14:13:44 -07:00
Daniel
bb11573405 servo: Merge #11072 - Implement IsShader fn and IsTexture fn for WebGLRenderingContext (from DDEFISHER:master); r=emilio
fixes #11064

Source-Repo: https://github.com/servo/servo
Source-Revision: f45a99c9fe5a4b05dd0d27f129d53ed1f75ea8ff
2016-05-10 03:16:20 -07:00
Patrick Walton
25cd84fdc2 servo: Merge #11000 - compositing: Send mouse events to the right pipeline when using WebRender (from pcwalton:wr-pipeline-relative-events); r=glennw
Fixes mouse events in browser.html.

Requires servo/webrender_traits#47 and servo/webrender#272.

r? @glennw
cc @paulrouget

Source-Repo: https://github.com/servo/servo
Source-Revision: 97dfcedbcfe781dc07661e4cfe886cc8edff7785
2016-05-04 14:55:09 -07:00
Keith Yeung
d27d3c60eb servo: Merge #10670 - Implement stencil fns for WebGLRenderingContext (from KiChjang:webgl-stencils); r=emilio
Depends on servo/webrender#261.

Closes #10659.

Source-Repo: https://github.com/servo/servo
Source-Revision: 78041737def89de90cba20ea29afe4e107008117
2016-04-24 12:40:59 -07:00
Emilio Cobos Álvarez
a30e4d95de servo: Merge #10443 - webgl: Implement the pending texImage2D overload, and add more validation (from emilio:webgl-teximage2d-overload); r=jdm
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.

Source-Repo: https://github.com/servo/servo
Source-Revision: f1defb446e8cd4e36231acae77f11c72c74964b0
2016-04-22 11:25:29 -07:00
David Zbarsky
433de7f243 servo: Merge #10652 - Prevent use of reserved names in BindAttribLocation (from dzbarsky:reserved); r=dzbarsky
(Depend on the WebGL tests landing)

Source-Repo: https://github.com/servo/servo
Source-Revision: 82b952c03f94c0b8433a9fccbe9b66aa7e704924
2016-04-19 09:17:24 +05:01
Adrian Utrilla
d9ccc49a05 servo: Merge #10436 - Added Uniform{2i, 2iv, 2fv, 3f, 3i, 3iv, 3fv} (from autrilla:uniform2); r=emilio
@emilio r?

Source-Repo: https://github.com/servo/servo
Source-Revision: 7845d670d0c0af7c4782c547e62c4b737e345fad
2016-04-14 17:12:12 +05:01
David Zbarsky
7243084069 servo: Merge #10379 - Implement GetActiveAttrib (from dzbarsky:getActiveAttrib); r=emilio
@emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 376980fb570c8f68c04eaed0b22e9046856aaaa0
2016-04-12 14:49:28 +05:01
Emilio Cobos Álvarez
7f3c31c248 servo: Merge #10224 - webgl: Add attribute validations and other nits (from emilio:shader-type-validations); r=jdm
Fixes https://github.com/servo/servo/issues/9958

Depends on a bunch of prs, and needs a test.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: f0014bd9cd5ac5db3e5a2f9fa8eafeb992df309a
2016-04-12 04:49:49 +05:01
Saurav Sachidanand
a69ed64e97 servo: Merge #10433 - Implement WebGLRenderingContext.getActiveUniform() (from saurvs:pr3); r=emilio
Fixes https://github.com/servo/servo/issues/10397

Source-Repo: https://github.com/servo/servo
Source-Revision: 4cc241c858ce8ee7894495d082a3bfc6233d80e8
2016-04-07 03:30:01 +05:01
Adrian Utrilla
436b0a1ead servo: Merge #10432 - Added Uniform{1iv, 2f, 2fv} (from autrilla:uniform); r=emilio
The remaining ones need changes to webrender_traits, so I'll have to open a PR there too.

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: a5bc74be2fc2b1ab43d5809d776a5056ac8f35c7
2016-04-07 02:09:03 +05:01
Ar13mis
3251d911d8 servo: Merge #10356 - WebGL: add Uniform2f (from this-jacob:add_uniform2f); r=emilio
Currently blocked on servo/webrender_traits#30

Source-Repo: https://github.com/servo/servo
Source-Revision: 95c410830c2cebcad2cf187c44e00343486e6e46
2016-04-05 07:01:42 +05:01
Adrian Utrilla
001f9b367f servo: Merge #10369 - Issue #10368: Implemented Uniform4iv and Uniform4i (from autrilla:Uniform4iv); r=emilio
Uniform4iv can make use of Uniform4i, so I implemented both.

Source-Repo: https://github.com/servo/servo
Source-Revision: 88d29e537cb3e92cc39804eabca7cb347c1417e9
2016-04-03 11:19:47 +05:01
Connor Brewster
d0bd2f8d97 servo: Merge #10215 - WebGL: Finish, Flush, DetachShader, GenerateMipmap (from cbrewster:webgl_finish); r=emilio
Implements #10212 and #10213

r? @emilio

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b32e63db843b4ac534c33a87ed53a4acf9b6da7
2016-04-02 23:39:47 +05:01
Jan-Fabian Humann
b60a127aa6 servo: Merge #10291 - #10211: Stop re-exporting webrender_traits WebGL types from canvas_traits (from jfhumann:10211); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 524a004e771b465e3de9ebbc33816e50949d6a25
2016-04-01 01:28:20 +05:01
Emilio Cobos Álvarez
98d36374a9 servo: Merge #10150 - Canvas cleanup (from emilio:canvas-cleanup); r=jdm
This PR cleans up the layerization infrastructure for canvas, which was unused, and removes unused dependencies.

It also takes in account my recent username change to update angle's dependency (offscreen_gl_context requires extra work due to webrender depending on it).

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2887623c4ae1960dfef52b14cd4afc3b279f9feb
2016-03-24 08:15:40 +05:01
Ms2ger
6bc75cd680 servo: Merge #10106 - Remove renderer ids (from Ms2ger:renderer-id); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: 767b11cd676327cfb71f21d2cbcee8c16a74e2b3
2016-03-22 08:21:28 +05:01