From e5892989caf418fe2b9990c61d19de55c47baf55 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 27 Sep 2018 18:44:02 -0400 Subject: [PATCH] Warn when using slow WebGL code path. --- components/canvas/webgl_thread.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 9256692599a..682993cefd3 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -220,7 +220,9 @@ impl WebGLThread { // 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)) });