diff options
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 754b073328d..abdda3c812a 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -826,8 +826,6 @@ impl WebGLImpl { ctx.gl().uniform_matrix_3fv(uniform_id, transpose, v), WebGLCommand::UniformMatrix4fv(uniform_id, transpose, ref v) => ctx.gl().uniform_matrix_4fv(uniform_id, transpose, v), - WebGLCommand::UseProgram(program_id) => - ctx.gl().use_program(program_id.get()), WebGLCommand::ValidateProgram(program_id) => ctx.gl().validate_program(program_id.get()), WebGLCommand::VertexAttrib(attrib_id, x, y, z, w) => @@ -965,6 +963,9 @@ impl WebGLImpl { WebGLCommand::LinkProgram(program_id, ref sender) => { return sender.send(Self::link_program(ctx.gl(), program_id)).unwrap(); } + WebGLCommand::UseProgram(program_id) => { + ctx.gl().use_program(program_id.map_or(0, |p| p.get())) + } } // TODO: update test expectations in order to enable debug assertions |