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