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