4 Solution: Problem is with skia once again. Output of webgl seems endian-correct, but skia only |
4 Solution: Problem is with skia once again. Output of webgl seems endian-correct, but skia only |
5 knows how to deal with little endian. |
5 knows how to deal with little endian. |
6 So we swizzle the output of webgl after reading it from readpixels() |
6 So we swizzle the output of webgl after reading it from readpixels() |
7 Note: This does not fix all webGL sites, but is a step in the right direction |
7 Note: This does not fix all webGL sites, but is a step in the right direction |
8 |
8 |
9 diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h |
9 Index: firefox-115.0/gfx/gl/GLContext.h |
10 --- a/gfx/gl/GLContext.h |
10 =================================================================== |
11 +++ b/gfx/gl/GLContext.h |
11 --- firefox-115.0.orig/gfx/gl/GLContext.h |
12 @@ -1548,16 +1548,23 @@ class GLContext : public GenericAtomicRe |
12 +++ firefox-115.0/gfx/gl/GLContext.h |
13 AFTER_GL_CALL; |
13 @@ -1560,6 +1560,13 @@ class GLContext : public GenericAtomicRe |
14 } |
|
15 |
|
16 void raw_fReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, |
|
17 GLenum format, GLenum type, GLvoid* pixels) { |
|
18 BEFORE_GL_CALL; |
14 BEFORE_GL_CALL; |
19 mSymbols.fReadPixels(x, y, width, height, format, type, pixels); |
15 mSymbols.fReadPixels(x, y, width, height, format, type, pixels); |
20 OnSyncCall(); |
16 OnSyncCall(); |
21 +#if MOZ_BIG_ENDIAN() |
17 +#if MOZ_BIG_ENDIAN() |
22 + uint8_t* itr = (uint8_t*)pixels; |
18 + uint8_t* itr = (uint8_t*)pixels; |