Skip to content

Commit

Permalink
Warn when using slow WebGL code path.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Sep 27, 2018
1 parent 0964d05 commit e589298
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/canvas/webgl_thread.rs
Expand Up @@ -220,7 +220,9 @@ impl<VR: WebVRRenderHandler + 'static> WebGLThread<VR> {
// Fallback to readback mode if the shared context creation fails.
let result = self.gl_factory.new_shared_context(version, size, attributes)
.map(|r| (r, WebGLContextShareMode::SharedTexture))
.or_else(|_| {
.or_else(|err| {
warn!("Couldn't create shared GL context ({}), using slow \
readback context instead.", err);
let ctx = self.gl_factory.new_context(version, size, attributes);
ctx.map(|r| (r, WebGLContextShareMode::Readback))
});
Expand Down

0 comments on commit e589298

Please sign in to comment.