Skip to content

Commit 36b5f54

Browse files
committed
gftexture
1 parent b2221e1 commit 36b5f54

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

components/script/dom/webglrenderingcontext.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,10 @@ impl WebGLRenderingContext {
278278
// NativeContext handling library changes the scissor after a resize, so we need to reset the
279279
// default scissor when the canvas was created or the last scissor that the user set.
280280
let rect = self.current_scissor.get();
281-
self.ipc_renderer
282-
.send(CanvasMsg::WebGL(WebGLCommand::Scissor(rect.0, rect.1, rect.2, rect.3)))
283-
.unwrap();
281+
self.send_comand(WebGLCommand::Scissor(rect.0, rect.1, rect.2, rect.3));
284282

285283
if let Some(id) = self.bound_texture_2d.get() {
286-
self.ipc_renderer
287-
.send(CanvasMsg::WebGL(WebGLCommand::BindTexture(constants::TEXTURE_2D, Some(id.id()))))
288-
.unwrap();
284+
self.send_comand(WebGLCommand::BindTexture(constants::TEXTURE_2D, Some(id.id())));
289285
}
290286
}
291287

0 commit comments

Comments
 (0)