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