summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 13:02:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 13:02:24 +0200
commit5b2b090a1569379fcbf213078c9c708510413856 (patch)
tree3305aefc1eada4f3afdf4f80e630ef856cea85b0
parente61e6f9792ecc046d0bed19b5f1add9237a84391 (diff)
downloaduxp-5b2b090a1569379fcbf213078c9c708510413856.tar.gz
Force enable alpha channel to prevent ANGLE from using incompatible backbuffer format.
-rw-r--r--dom/canvas/WebGLContext.cpp8
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);
+ }
//////