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