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