summaryrefslogtreecommitdiff
path: root/mozilla-bmo849632.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 16:23:41 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 16:23:41 +0000
commitbac4e156d8d54aa3a82bc30d20c9234776631881 (patch)
treea3408825c9e3c0e6f300598835ea1f5d761bb5b4 /mozilla-bmo849632.patch
parentc368e7da13ec9d52b1ea63b59b0af1f8d8044fb8 (diff)
automatic import of firefoxopeneuler24.03_LTSopeneuler23.09
Diffstat (limited to 'mozilla-bmo849632.patch')
-rw-r--r--mozilla-bmo849632.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/mozilla-bmo849632.patch b/mozilla-bmo849632.patch
new file mode 100644
index 0000000..913d6bc
--- /dev/null
+++ b/mozilla-bmo849632.patch
@@ -0,0 +1,26 @@
+# HG changeset patch
+# Parent 3de59fe1b8708c01e134ce698c4232b8a854f617
+Problem: webGL sites are displayed in the wrong color (usually blue-ish)
+Solution: Problem is with skia once again. Output of webgl seems endian-correct, but skia only
+ knows how to deal with little endian.
+ So we swizzle the output of webgl after reading it from readpixels()
+Note: This does not fix all webGL sites, but is a step in the right direction
+
+Index: firefox-115.0/gfx/gl/GLContext.h
+===================================================================
+--- firefox-115.0.orig/gfx/gl/GLContext.h
++++ firefox-115.0/gfx/gl/GLContext.h
+@@ -1560,6 +1560,13 @@ class GLContext : public GenericAtomicRe
+ BEFORE_GL_CALL;
+ mSymbols.fReadPixels(x, y, width, height, format, type, pixels);
+ OnSyncCall();
++#if MOZ_BIG_ENDIAN()
++ uint8_t* itr = (uint8_t*)pixels;
++ for (GLsizei i = 0; i < width * height; i++) {
++ NativeEndian::swapToLittleEndianInPlace((uint32_t*)itr, 1);
++ itr += 4;
++ }
++#endif
+ AFTER_GL_CALL;
+ mHeavyGLCallsSinceLastFlush = true;
+ }