blockingly shut-down webrender when exiting webgl_thread

This commit is contained in:
Gregory Terzian 2020-06-15 21:02:36 +08:00
parent 581ade575e
commit 59896748b5
40 changed files with 47 additions and 49 deletions

View file

@ -333,6 +333,14 @@ impl WebGLThread {
Ok(msg) => {
let exit = self.handle_msg(msg, &webgl_chan);
if exit {
// Call remove_context functions in order to correctly delete WebRender image keys.
let context_ids: Vec<WebGLContextId> = self.contexts.keys().map(|id| *id).collect();
for id in context_ids {
self.remove_webgl_context(id);
}
// Block on shutting-down WebRender.
self.webrender_api.shut_down(true);
return;
}
}
@ -1101,16 +1109,6 @@ impl WebGLThread {
}
}
impl Drop for WebGLThread {
fn drop(&mut self) {
// Call remove_context functions in order to correctly delete WebRender image keys.
let context_ids: Vec<WebGLContextId> = self.contexts.keys().map(|id| *id).collect();
for id in context_ids {
self.remove_webgl_context(id);
}
}
}
/// Helper struct to store cached WebGLContext information.
struct WebGLContextInfo {
/// Currently used WebRender image key.

View file

@ -1,6 +1,6 @@
[framebuffer-object-attachment.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_ENUM : ]
expected: FAIL

View file

@ -2,7 +2,7 @@
bug: https://github.com/servo/servo/issues/20529
expected:
if os == "linux": ERROR
if os == "mac": TIMEOUT
if os == "mac": CRASH
[WebGL test #17: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,2 +1,2 @@
[readbuffer.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,2 +1,2 @@
[read-draw-when-missing-image.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,7 +1,7 @@
[gl-object-get-calls.html]
bug: https://github.com/servo/servo/issues/26128
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
[WebGL test #201: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_R) should be 33071 (of type number). Was null (of type object).]
expected: FAIL

View file

@ -1,4 +1,4 @@
[tex-2d-r11f_g11f_b10f-rgb-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-r16f-red-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-r32f-red-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-r8-red-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-r8ui-red_integer-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rg16f-rg-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rg32f-rg-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rg8-rg-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rg8ui-rg_integer-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb10_a2-rgba-unsigned_int_2_10_10_10_rev.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb16f-rgb-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb565-rgb-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb565-rgb-unsigned_short_5_6_5.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb5_a1-rgba-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb8-rgb-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb8ui-rgb_integer-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgb9_e5-rgb-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgba16f-rgba-float.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgba4-rgba-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgba4-rgba-unsigned_short_4_4_4_4.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-rgba8ui-rgba_integer-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-srgb8-rgb-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-2d-srgb8_alpha8-rgba-unsigned_byte.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,2 +1,2 @@
[copy-texture-image-same-texture.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,2 +1,2 @@
[copy-texture-image.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,4 +1,4 @@
[tex-image-with-bad-args-from-dom-elements.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,5 +1,5 @@
[tex-image-with-bad-args.html]
expected: TIMEOUT
expected: CRASH
[WebGL test #5: getError expected: INVALID_OPERATION. Was INVALID_ENUM : TexImage2D taking LUMINANCE_ALPHA/LUMINANCE_ALPHA/HALF_FLOAT]
expected: FAIL

View file

@ -1,4 +1,4 @@
[tex-image-with-different-data-source.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,4 +1,4 @@
[tex-unpack-params-with-flip-y-and-premultiply-alpha.html]
expected:
if os == "mac": TIMEOUT
if os == "mac": CRASH
if os == "linux": CRASH

View file

@ -1,2 +1,2 @@
[texture-npot.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,2 +1,2 @@
[switching-objects.html]
expected: TIMEOUT
expected: CRASH

View file

@ -1,2 +1,2 @@
[incompatible-texture-type-for-sampler.html]
expected: TIMEOUT
expected: CRASH