servo: Merge #19091 - Add WebGL conformance 2.0.0 tests (from MortimerGoro:webgl2_suite); r=jdm

<!-- Please describe your changes on the following line: -->

This PR includes WebGL conformance 2.0.0 tests. For now I have disabled three folders in the new suite:
- `Conformance`: Tests WebGL 1.0 API like the current 1.0.3 suite we are using, but it includes a lot more tests and many expectations have to be updated. This is better to do in a separate PR because it will require to update github intermittent paths again and maybe detect new intermittents.
- `Conformance2\textures`: It causes a lot of timeouts because of using videos, svgs, and other complicated formats.
- `deqp`: It's a extra GPU testing suite included in the Khronos 2.0.0 suite. Disabled for now because it causes some timeouts.

So in a nutshell, it uses part of the 2.0.0 suite to test webgl 2.0 and keeps using 1.0.3 in order to test WebGL 1.0. It's good enough to enable TDD for the new WebGL 2.0 features

We can create follow-up issues for the next steps:
* deprecate 1.0.3 and use the new 'conformance' folder in 2.0.0 in order to test WebGL 1.0
* Enable `conformance2/textures` and  'deqp' tests once WebGL 2.0 implementation is more advanced or the timeouts are monitored in more detail.

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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: 92b49010b107ffd8be9169a1c979710338dc24c4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 26a7a8fc2de70863d0e85ffb7d2b2da439dac2b9
This commit is contained in:
Imanol Fernandez 2017-11-02 15:52:42 -05:00
parent 7eb5cd2f86
commit 3497b6c815
5 changed files with 11 additions and 8 deletions

10
servo/Cargo.lock generated
View File

@ -295,7 +295,7 @@ dependencies = [
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
"webrender 0.53.1 (git+https://github.com/servo/webrender)",
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
@ -312,7 +312,7 @@ dependencies = [
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
"nonzero 0.0.1",
"offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1",
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
@ -2084,7 +2084,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "offscreen_gl_context"
version = "0.12.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2547,7 +2547,7 @@ dependencies = [
"net_traits 0.0.1",
"nonzero 0.0.1",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
"open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3818,7 +3818,7 @@ dependencies = [
"checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
"checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297"
"checksum odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "c3df9b730298cea3a1c3faa90b7e2f9df3a9c400d0936d6015e6165734eefcba"
"checksum offscreen_gl_context 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2211cc1c0513c664d64f1e2a15d9d7ded52a90f115946e3b2acc7a651d8404f9"
"checksum offscreen_gl_context 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a34d93fc471702a477584ad881d9e026bafb3479b76b9c300980ab810d9fc4ec"
"checksum ogg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7137bf02687385302f4c0aecd77cfce052b69f5b4ee937be778e125c62f67e30"
"checksum ogg_metadata 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc665717454399cba557c55ad226148996e9266ee291f8a37a98bb2cded0a490"
"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"

View File

@ -909,6 +909,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<WebGL2RenderingContext> {
#[allow(unsafe_code)]
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
HTMLCanvasDataSource::WebGL((*self.unsafe_get()).base.layout_handle())
let this = &*self.unsafe_get();
HTMLCanvasDataSource::WebGL((*this.base.to_layout().unsafe_get()).layout_handle())
}
}

View File

@ -895,7 +895,7 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path)
@Command('update-webgl',
description='Update the WebGL conformance suite tests from Khronos repo',
category='testing')
@CommandArgument('--version', action='store_true', default='1.0.3',
@CommandArgument('--version', default='2.0.0',
help='WebGL conformance suite version')
def update_webgl(self, version=None):
self.ensure_bootstrapped()

View File

@ -16,7 +16,7 @@
"dom.testable_crash.enabled": false,
"dom.testbinding.enabled": false,
"dom.webgl.dom_to_texture.enabled": false,
"dom.webgl2.enabled.enabled": false,
"dom.webgl2.enabled": false,
"dom.webvr.enabled": false,
"dom.webvr.event_polling_interval": 500,
"js.asmjs.enabled": true,

View File

@ -53,6 +53,8 @@ files = [
"./tests/wpt/metadata/MANIFEST.json",
"./components/script/dom/webidls/ForceTouchEvent.webidl",
"./support/android/openssl.sh",
# Upstream code from Khronos/WebGL uses tabs for indentation
"./tests/wpt/mozilla/tests/webgl",
# Ignore those files since the issues reported are on purpose
"./tests/html/bad-line-ends.html",
"./tests/unit/net/parsable_mime/text",