aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_paint_task.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2015-12-03 19:24:33 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2015-12-04 10:58:26 +0100
commitf3bd1f787947132edce63aa5dffe238d59f9c01f (patch)
tree577b8cbbcbda5d3c98681a8d5b1a44645475fef4 /components/canvas/webgl_paint_task.rs
parent3af24ed119f8612b153daf443497ec767f687ef7 (diff)
downloadservo-f3bd1f787947132edce63aa5dffe238d59f9c01f.tar.gz
servo-f3bd1f787947132edce63aa5dffe238d59f9c01f.zip
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.
Diffstat (limited to 'components/canvas/webgl_paint_task.rs')
-rw-r--r--components/canvas/webgl_paint_task.rs3
1 files changed, 3 insertions, 0 deletions
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