mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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 -->
This commit is contained in:
commit
057acdca2d
1 changed files with 3 additions and 1 deletions
|
@ -220,7 +220,9 @@ impl<VR: WebVRRenderHandler + 'static> WebGLThread<VR> {
|
||||||
// Fallback to readback mode if the shared context creation fails.
|
// Fallback to readback mode if the shared context creation fails.
|
||||||
let result = self.gl_factory.new_shared_context(version, size, attributes)
|
let result = self.gl_factory.new_shared_context(version, size, attributes)
|
||||||
.map(|r| (r, WebGLContextShareMode::SharedTexture))
|
.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);
|
let ctx = self.gl_factory.new_context(version, size, attributes);
|
||||||
ctx.map(|r| (r, WebGLContextShareMode::Readback))
|
ctx.map(|r| (r, WebGLContextShareMode::Readback))
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue