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