aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-10-01 09:26:19 -0400
committerGitHub <noreply@github.com>2018-10-01 09:26:19 -0400
commit057acdca2d806508be77e0e84c2a627e8b48fa41 (patch)
tree4ccc113f0fd3e40c5b77bf2fd719de1ca2edc7b9 /components/canvas/webgl_thread.rs
parent29fdf043385957981eb70bbfaa7c30633d0cab5b (diff)
parent26e1001efd70e5df4db8af268f7d896634d45b8c (diff)
downloadservo-057acdca2d806508be77e0e84c2a627e8b48fa41.tar.gz
servo-057acdca2d806508be77e0e84c2a627e8b48fa41.zip
Auto merge of #21828 - servo:jdm-patch-36, r=nox
Warn when using slow WebGL code path. This will make it more obvious when one source of WebGL performance problems is present. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21828) <!-- Reviewable:end -->
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r--components/canvas/webgl_thread.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 9256692599a..c6d9082b7e0 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -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))
});