From 95a0d0584ff9e628da01d497cef8184822188d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 13:29:46 +0100 Subject: [PATCH 1/7] webgl: Add destructors for texture, program, shader, buffer and framebuffer This allows to cleanup resources earlier if they stop being used. Right now all resources were cleaned up when the context was destroyed, this is a slightly better approach. We ignore the possible failure of the send() call, since we don't keep track of these resources from the `WebGLRenderingContext` structure, so a texture could be destroyed after the context and give us problems. --- components/script/dom/webglbuffer.rs | 8 +++++++- components/script/dom/webglframebuffer.rs | 8 +++++++- components/script/dom/webglprogram.rs | 8 +++++++- components/script/dom/webglrenderbuffer.rs | 2 +- components/script/dom/webglshader.rs | 8 +++++++- components/script/dom/webgltexture.rs | 8 +++++++- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/components/script/dom/webglbuffer.rs b/components/script/dom/webglbuffer.rs index 05f8d7263bb..17f13f33380 100644 --- a/components/script/dom/webglbuffer.rs +++ b/components/script/dom/webglbuffer.rs @@ -71,7 +71,13 @@ impl WebGLBuffer { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteBuffer(self.id))).unwrap(); + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteBuffer(self.id))); } } } + +impl Drop for WebGLBuffer { + fn drop(&mut self) { + self.delete(); + } +} diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index a3a9781fbfb..6239312f9a9 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -60,7 +60,13 @@ impl WebGLFramebuffer { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteFramebuffer(self.id))).unwrap(); + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteFramebuffer(self.id))); } } } + +impl Drop for WebGLFramebuffer { + fn drop(&mut self) { + self.delete(); + } +} diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs index 997f48c96b4..5e51172cb68 100644 --- a/components/script/dom/webglprogram.rs +++ b/components/script/dom/webglprogram.rs @@ -58,7 +58,7 @@ impl WebGLProgram { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteProgram(self.id))).unwrap(); + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteProgram(self.id))); } } @@ -125,3 +125,9 @@ impl WebGLProgram { Ok(receiver.recv().unwrap()) } } + +impl Drop for WebGLProgram { + fn drop(&mut self) { + self.delete(); + } +} diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs index b01bcce896a..6a534da53e6 100644 --- a/components/script/dom/webglrenderbuffer.rs +++ b/components/script/dom/webglrenderbuffer.rs @@ -59,7 +59,7 @@ impl WebGLRenderbuffer { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteRenderbuffer(self.id))).unwrap(); + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteRenderbuffer(self.id))); } } } diff --git a/components/script/dom/webglshader.rs b/components/script/dom/webglshader.rs index e33b27d3839..65dc958033f 100644 --- a/components/script/dom/webglshader.rs +++ b/components/script/dom/webglshader.rs @@ -121,7 +121,7 @@ impl WebGLShader { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteShader(self.id))).unwrap() + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteShader(self.id))); } } @@ -152,3 +152,9 @@ impl WebGLShader { *self.source.borrow_mut() = Some(source); } } + +impl Drop for WebGLShader { + fn drop(&mut self) { + self.delete(); + } +} diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs index fb8ee4033fd..d5f7ad8258e 100644 --- a/components/script/dom/webgltexture.rs +++ b/components/script/dom/webgltexture.rs @@ -78,7 +78,7 @@ impl WebGLTexture { pub fn delete(&self) { if !self.is_deleted.get() { self.is_deleted.set(true); - self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteTexture(self.id))).unwrap(); + let _ = self.renderer.send(CanvasMsg::WebGL(CanvasWebGLMsg::DeleteTexture(self.id))); } } @@ -145,3 +145,9 @@ impl WebGLTexture { } } } + +impl Drop for WebGLTexture { + fn drop(&mut self) { + self.delete(); + } +} From 2c87249311cda3cbac64a144135847351d8181c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 13:31:52 +0100 Subject: [PATCH 2/7] Bump offscreen_rendering_context to remove duplicated Glutin dependency --- components/servo/Cargo.lock | 34 ++-------------------------------- ports/cef/Cargo.lock | 34 ++-------------------------------- ports/gonk/Cargo.lock | 7 ++++--- 3 files changed, 8 insertions(+), 67 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index d62b48cec42..446af0a8638 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -749,36 +749,6 @@ dependencies = [ "x11-dl 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "glutin" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-kbd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-window 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "glutin_app" version = "0.0.1" @@ -1303,14 +1273,14 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#a33af19355dfdd0076a3f2836dc66e0fea44bcab" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 1fa03c0f628..d77a6d26efd 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -699,36 +699,6 @@ dependencies = [ "x11-dl 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "glutin" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-graphics 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_common 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "shared_library 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-client 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-kbd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wayland-window 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "glutin_app" version = "0.0.1" @@ -1237,14 +1207,14 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#a33af19355dfdd0076a3f2836dc66e0fea44bcab" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 4004400466a..e3a26fa1e21 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -673,7 +673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "glutin" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/servo/glutin?branch=servo#6525e224e3b5b3ad4f0af8d87460512eb64e8c59" dependencies = [ "android_glue 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -697,6 +697,7 @@ dependencies = [ "wayland-kbd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-window 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "x11-dl 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1186,14 +1187,14 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#a33af19355dfdd0076a3f2836dc66e0fea44bcab" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.4.0 (git+https://github.com/servo/glutin?branch=servo)", "khronos_api 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", From 35473b0009123de2a95d8072d93ff6703008b094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 13:37:56 +0100 Subject: [PATCH 3/7] Try to re-enable webgl reftests I can't reproduce locally the failure that produced them, and since the builds that triggered them are deleted for some reason (like http://build.servo.org/builders/linux-dev/builds/419), it could be a good moment to troubleshoot it. If merged closes #7931 --- tests/ref/basic.list | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/ref/basic.list b/tests/ref/basic.list index dd24a6924f1..c5c5cbe46dd 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -107,13 +107,12 @@ resolution=800x600 == viewport_percentage_vw_vh.html viewport_percentage_vw_vh_a # resolution=600x800 == viewport_percentage_vw_vh.html viewport_percentage_vw_vh_b.html prefs:"layout.viewport.enabled" == viewport_rule.html viewport_rule_ref.html -# https://github.com/servo/servo/issues/7931 -# == webgl-context/clearcolor.html webgl-context/clearcolor_ref.html -# == webgl-context/draw_arrays_simple.html webgl-context/draw_arrays_simple_ref.html -# == webgl-context/tex_image_2d_canvas.html webgl-context/tex_image_2d_canvas_ref.html -# == webgl-context/tex_image_2d_canvas2d.html webgl-context/tex_image_2d_canvas_ref.html -# == webgl-context/tex_image_2d_canvas_no_context.html webgl-context/tex_image_2d_canvas_no_context_ref.html -# == webgl-context/tex_image_2d_simple.html webgl-context/tex_image_2d_simple_ref.html +== webgl-context/clearcolor.html webgl-context/clearcolor_ref.html +== webgl-context/draw_arrays_simple.html webgl-context/draw_arrays_simple_ref.html +== webgl-context/tex_image_2d_canvas.html webgl-context/tex_image_2d_canvas_ref.html +== webgl-context/tex_image_2d_canvas2d.html webgl-context/tex_image_2d_canvas_ref.html +== webgl-context/tex_image_2d_canvas_no_context.html webgl-context/tex_image_2d_canvas_no_context_ref.html +== webgl-context/tex_image_2d_simple.html webgl-context/tex_image_2d_simple_ref.html flaky_macos == white_space_intrinsic_sizes_a.html white_space_intrinsic_sizes_ref.html From 938a05428aede1ddf65258d2d259baba9a5866b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 14:47:46 +0100 Subject: [PATCH 4/7] servo/main: Load gl symbols in headless mode This allows running WebGL reftests in wpt. --- components/servo/Cargo.lock | 1 + components/servo/Cargo.toml | 3 +++ components/servo/main.rs | 16 ++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 446af0a8638..56143d3776d 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -24,6 +24,7 @@ dependencies = [ "net 0.0.1", "net_tests 0.0.1", "net_traits 0.0.1", + "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "profile 0.0.1", "profile_traits 0.0.1", "script 0.0.1", diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index db611072946..d1bb7634689 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -133,6 +133,9 @@ features = ["plugins"] [dependencies.gleam] version = "0.1" +[dependencies.offscreen_gl_context] +git = "https://github.com/ecoal95/rust-offscreen-rendering-context" + [dependencies] env_logger = "0.3" time = "0.1.12" diff --git a/components/servo/main.rs b/components/servo/main.rs index b339babb972..6d830e7be73 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -29,12 +29,25 @@ extern crate log; extern crate servo; extern crate time; +extern crate gleam; +extern crate offscreen_gl_context; + +use gleam::gl; +use offscreen_gl_context::GLContext; use servo::Browser; use servo::compositing::windowing::WindowEvent; use servo::net_traits::hosts; use servo::util::opts; use std::rc::Rc; +#[cfg(not(target_os = "android"))] +fn load_gl_when_headless() { + gl::load_with(|addr| GLContext::get_proc_address(addr) as *const _); +} + +#[cfg(target_os = "android")] +fn load_gl_when_headless() {} + fn main() { env_logger::init().unwrap(); @@ -47,6 +60,9 @@ fn main() { hosts::global_init(); let window = if opts::get().headless { + // Load gl functions even when in headless mode, + // to avoid crashing with webgl + load_gl_when_headless(); None } else { Some(app::create_window(std::ptr::null_mut())) From 12d1464220b0b820a5ebdc6f6ab8912ca388e875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 14:48:57 +0100 Subject: [PATCH 5/7] Move WebGL reftests to wpt/mozilla --- tests/ref/basic.list | 7 -- tests/wpt/mozilla/meta/MANIFEST.json | 72 ++++++++++++++++++ .../tests/mozilla/webgl}/clearcolor.html | 0 .../tests/mozilla/webgl}/clearcolor_ref.html | 0 .../mozilla/webgl}/draw_arrays_simple.html | 0 .../webgl}/draw_arrays_simple_ref.html | 0 .../mozilla/webgl}/img/rust-logo-256x256.png | Bin .../mozilla/webgl}/tex_image_2d_canvas.html | 0 .../mozilla/webgl}/tex_image_2d_canvas2d.html | 0 .../tex_image_2d_canvas_no_context.html | 0 .../tex_image_2d_canvas_no_context_ref.html | 0 .../webgl}/tex_image_2d_canvas_ref.html | 0 .../mozilla/webgl}/tex_image_2d_simple.html | 0 .../webgl}/tex_image_2d_simple_ref.html | 0 14 files changed, 72 insertions(+), 7 deletions(-) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/clearcolor.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/clearcolor_ref.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/draw_arrays_simple.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/draw_arrays_simple_ref.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/img/rust-logo-256x256.png (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_canvas.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_canvas2d.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_canvas_no_context.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_canvas_no_context_ref.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_canvas_ref.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_simple.html (100%) rename tests/{ref/webgl-context => wpt/mozilla/tests/mozilla/webgl}/tex_image_2d_simple_ref.html (100%) diff --git a/tests/ref/basic.list b/tests/ref/basic.list index c5c5cbe46dd..c363d8f96f6 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -107,13 +107,6 @@ resolution=800x600 == viewport_percentage_vw_vh.html viewport_percentage_vw_vh_a # resolution=600x800 == viewport_percentage_vw_vh.html viewport_percentage_vw_vh_b.html prefs:"layout.viewport.enabled" == viewport_rule.html viewport_rule_ref.html -== webgl-context/clearcolor.html webgl-context/clearcolor_ref.html -== webgl-context/draw_arrays_simple.html webgl-context/draw_arrays_simple_ref.html -== webgl-context/tex_image_2d_canvas.html webgl-context/tex_image_2d_canvas_ref.html -== webgl-context/tex_image_2d_canvas2d.html webgl-context/tex_image_2d_canvas_ref.html -== webgl-context/tex_image_2d_canvas_no_context.html webgl-context/tex_image_2d_canvas_no_context_ref.html -== webgl-context/tex_image_2d_simple.html webgl-context/tex_image_2d_simple_ref.html - flaky_macos == white_space_intrinsic_sizes_a.html white_space_intrinsic_sizes_ref.html diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index bc04fb431a2..b8c52f7f5be 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -4078,6 +4078,78 @@ ], "url": "/_mozilla/mozilla/canvas/drawimage_html_image_9.html" } + ], + "mozilla/webgl/clearcolor.html": [ + { + "path": "mozilla/webgl/clearcolor.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/clearcolor_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/clearcolor.html" + } + ], + "mozilla/webgl/tex_image_2d_canvas_no_context.html": [ + { + "path": "mozilla/webgl/tex_image_2d_canvas_no_context.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/tex_image_2d_canvas_no_context_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/tex_image_2d_canvas_no_context.html" + } + ], + "mozilla/webgl/tex_image_2d_canvas2d.html": [ + { + "path": "mozilla/webgl/tex_image_2d_canvas2d.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/tex_image_2d_canvas_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/tex_image_2d_canvas2d.html" + } + ], + "mozilla/webgl/tex_image_2d_canvas.html": [ + { + "path": "mozilla/webgl/tex_image_2d_canvas.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/tex_image_2d_canvas_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/tex_image_2d_canvas.html" + } + ], + "mozilla/webgl/tex_image_2d_simple.html": [ + { + "path": "mozilla/webgl/tex_image_2d_simple.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/tex_image_2d_simple_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/tex_image_2d_simple.html" + } + ], + "mozilla/webgl/draw_arrays_simple.html": [ + { + "path": "mozilla/webgl/draw_arrays_simple.html", + "references": [ + [ + "/_mozilla/mozilla/webgl/draw_arrays_simple_ref.html", + "==" + ] + ], + "url": "/_mozilla/mozilla/webgl/draw_arrays_simple.html" + } ] }, "testharness": { diff --git a/tests/ref/webgl-context/clearcolor.html b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor.html similarity index 100% rename from tests/ref/webgl-context/clearcolor.html rename to tests/wpt/mozilla/tests/mozilla/webgl/clearcolor.html diff --git a/tests/ref/webgl-context/clearcolor_ref.html b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_ref.html similarity index 100% rename from tests/ref/webgl-context/clearcolor_ref.html rename to tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_ref.html diff --git a/tests/ref/webgl-context/draw_arrays_simple.html b/tests/wpt/mozilla/tests/mozilla/webgl/draw_arrays_simple.html similarity index 100% rename from tests/ref/webgl-context/draw_arrays_simple.html rename to tests/wpt/mozilla/tests/mozilla/webgl/draw_arrays_simple.html diff --git a/tests/ref/webgl-context/draw_arrays_simple_ref.html b/tests/wpt/mozilla/tests/mozilla/webgl/draw_arrays_simple_ref.html similarity index 100% rename from tests/ref/webgl-context/draw_arrays_simple_ref.html rename to tests/wpt/mozilla/tests/mozilla/webgl/draw_arrays_simple_ref.html diff --git a/tests/ref/webgl-context/img/rust-logo-256x256.png b/tests/wpt/mozilla/tests/mozilla/webgl/img/rust-logo-256x256.png similarity index 100% rename from tests/ref/webgl-context/img/rust-logo-256x256.png rename to tests/wpt/mozilla/tests/mozilla/webgl/img/rust-logo-256x256.png diff --git a/tests/ref/webgl-context/tex_image_2d_canvas.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_canvas.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas.html diff --git a/tests/ref/webgl-context/tex_image_2d_canvas2d.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas2d.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_canvas2d.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas2d.html diff --git a/tests/ref/webgl-context/tex_image_2d_canvas_no_context.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_no_context.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_canvas_no_context.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_no_context.html diff --git a/tests/ref/webgl-context/tex_image_2d_canvas_no_context_ref.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_no_context_ref.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_canvas_no_context_ref.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_no_context_ref.html diff --git a/tests/ref/webgl-context/tex_image_2d_canvas_ref.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_ref.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_canvas_ref.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_canvas_ref.html diff --git a/tests/ref/webgl-context/tex_image_2d_simple.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_simple.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_simple.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_simple.html diff --git a/tests/ref/webgl-context/tex_image_2d_simple_ref.html b/tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_simple_ref.html similarity index 100% rename from tests/ref/webgl-context/tex_image_2d_simple_ref.html rename to tests/wpt/mozilla/tests/mozilla/webgl/tex_image_2d_simple_ref.html From 641e54bd41235fc52cc7995b276b7c3c35cd288c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 1 Nov 2015 20:51:23 +0100 Subject: [PATCH 6/7] Bump offscreen_gl_context This new version shold prevent crashing on the linux buildbots. --- components/servo/Cargo.lock | 2 +- ports/cef/Cargo.lock | 3 ++- ports/gonk/Cargo.lock | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 56143d3776d..3408bc362c9 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -1274,7 +1274,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aae6e57969c553973c43ce5e4246831ccc2868f0" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index d77a6d26efd..83441a25f5d 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -1207,7 +1207,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aae6e57969c553973c43ce5e4246831ccc2868f0" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1557,6 +1557,7 @@ dependencies = [ "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", + "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "profile 0.0.1", "profile_traits 0.0.1", "script 0.0.1", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index e3a26fa1e21..5a6271d15ca 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -1187,7 +1187,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.1.0" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#05a1ea3a7cb6fac044e2c6133ab334ca522d2b92" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aae6e57969c553973c43ce5e4246831ccc2868f0" dependencies = [ "cgl 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1536,6 +1536,7 @@ dependencies = [ "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", + "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "profile 0.0.1", "profile_traits 0.0.1", "script 0.0.1", From 8fff34e2e78137b5117ab0db86f9aadd56cc50e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 2 Nov 2015 14:05:05 +0100 Subject: [PATCH 7/7] Disable WebGL reftests on linux --- tests/wpt/mozilla/meta/mozilla/webgl/clearcolor.html.ini | 4 ++++ .../mozilla/meta/mozilla/webgl/draw_arrays_simple.html.ini | 4 ++++ .../mozilla/meta/mozilla/webgl/tex_image_2d_canvas.html.ini | 4 ++++ .../mozilla/meta/mozilla/webgl/tex_image_2d_canvas2d.html.ini | 4 ++++ .../mozilla/webgl/tex_image_2d_canvas_no_context.html.ini | 4 ++++ .../mozilla/meta/mozilla/webgl/tex_image_2d_simple.html.ini | 4 ++++ 6 files changed, 24 insertions(+) create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/clearcolor.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/draw_arrays_simple.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas2d.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas_no_context.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_simple.html.ini diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/clearcolor.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/clearcolor.html.ini new file mode 100644 index 00000000000..1e165de7e35 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/clearcolor.html.ini @@ -0,0 +1,4 @@ +[clearcolor.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931 diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/draw_arrays_simple.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/draw_arrays_simple.html.ini new file mode 100644 index 00000000000..a2e2bcbe38c --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/draw_arrays_simple.html.ini @@ -0,0 +1,4 @@ +[draw_arrays_simple.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931 diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas.html.ini new file mode 100644 index 00000000000..607db76d5b0 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas.html.ini @@ -0,0 +1,4 @@ +[tex_image_2d_canvas.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931 diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas2d.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas2d.html.ini new file mode 100644 index 00000000000..7ac62f03efb --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas2d.html.ini @@ -0,0 +1,4 @@ +[tex_image_2d_canvas2d.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931 diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas_no_context.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas_no_context.html.ini new file mode 100644 index 00000000000..fe7aa9f7c18 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_canvas_no_context.html.ini @@ -0,0 +1,4 @@ +[tex_image_2d_canvas_no_context.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931 diff --git a/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_simple.html.ini b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_simple.html.ini new file mode 100644 index 00000000000..6e8ee6ab2c1 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/webgl/tex_image_2d_simple.html.ini @@ -0,0 +1,4 @@ +[tex_image_2d_simple.html] + type: testharness + disabled: + if os == "linux": https://github.com/servo/servo/issues/7931