f7e2cb
Problem:  webGL sites are displayed in the wrong color (usually blue-ish)
f7e2cb
Solution: Problem is with skia once again. Output of webgl seems endian-correct, but skia only
f7e2cb
          knows how to deal with little endian.
f7e2cb
          So we swizzle the output of webgl after reading it from readpixels()
f7e2cb
Note:     This does not fix all webGL sites, but is a step in the right direction
f7e2cb
diff -r 6b017d3e9733 gfx/gl/GLContext.h
f7e2cb
--- a/gfx/gl/GLContext.h    Mon Sep 09 10:04:05 2019 +0200
f7e2cb
+++ b/gfx/gl/GLContext.h    Wed Nov 13 17:13:04 2019 +0100
f7e2cb
@@ -1551,6 +1551,13 @@
f7e2cb
     BEFORE_GL_CALL;
f7e2cb
     mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
f7e2cb
     OnSyncCall();
f7e2cb
+#if MOZ_BIG_ENDIAN
f7e2cb
+    uint8_t* itr = (uint8_t*)pixels;
f7e2cb
+    for (GLsizei i = 0; i < width * height; i++) {
f7e2cb
+      NativeEndian::swapToLittleEndianInPlace((uint32_t*)itr, 1);
f7e2cb
+      itr += 4;
f7e2cb
+    }
f7e2cb
+#endif
f7e2cb
     AFTER_GL_CALL;
f7e2cb
     mHeavyGLCallsSinceLastFlush = true;
f7e2cb
   }
f7e2cb