diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 13:02:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 13:02:24 +0200 |
commit | 5b2b090a1569379fcbf213078c9c708510413856 (patch) | |
tree | 3305aefc1eada4f3afdf4f80e630ef856cea85b0 | |
parent | e61e6f9792ecc046d0bed19b5f1add9237a84391 (diff) | |
download | uxp-5b2b090a1569379fcbf213078c9c708510413856.tar.gz |
Force enable alpha channel to prevent ANGLE from using incompatible backbuffer format.
-rw-r--r-- | dom/canvas/WebGLContext.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index 32eed63541..6768afcf8b 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -739,8 +739,12 @@ WebGLContext::CreateAndInitGL(bool forceEnabled, ////// - if (tryANGLE) - return CreateAndInitGLWith(CreateGLWithANGLE, baseCaps, flags, out_failReasons); + if (tryANGLE) { + // Force enable alpha channel to make sure ANGLE use correct framebuffer format + gl::SurfaceCaps& angleCaps = const_cast<gl::SurfaceCaps&>(baseCaps); + angleCaps.alpha = true; + return CreateAndInitGLWith(CreateGLWithANGLE, angleCaps, flags, out_failReasons); + } ////// |