From f3bd1f787947132edce63aa5dffe238d59f9c01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 3 Dec 2015 19:24:33 +0100 Subject: [PATCH] webgl: Ensure we don't generate gl errors in the paint task The validations performed in the script side of this should always prevent this from happening, and this will allow us to catch bugs like the previous one. --- components/canvas/webgl_paint_task.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/canvas/webgl_paint_task.rs b/components/canvas/webgl_paint_task.rs index 40247266472..634a72e61fa 100644 --- a/components/canvas/webgl_paint_task.rs +++ b/components/canvas/webgl_paint_task.rs @@ -169,6 +169,9 @@ impl WebGLPaintTask { CanvasWebGLMsg::DrawingBufferHeight(sender) => self.send_drawing_buffer_height(sender), } + + // FIXME: Convert to `debug_assert!` once tests are run with debug assertions + assert!(gl::get_error() == gl::NO_ERROR); } /// Creates a new `WebGLPaintTask` and returns the out-of-process sender and the in-process