53e0e7
# HG changeset patch
53e0e7
# User M. Sirringhaus <msirringhaus@suse.de>
53e0e7
# Date 1645518286 -3600
53e0e7
#      Tue Feb 22 09:24:46 2022 +0100
53e0e7
# Node ID 494640792b4677f6462e95b90a54a4e22aeb738b
53e0e7
# Parent  81832d035e101471dcf52dd91de287268add7a91
53e0e7
imported patch one_swizzle_to_rule_them_all.patch
53e0e7
53e0e7
Index: firefox-102.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp
53e0e7
===================================================================
53e0e7
--- firefox-102.0.orig/gfx/webrender_bindings/RenderCompositorSWGL.cpp
53e0e7
+++ firefox-102.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp
53e0e7
@@ -7,6 +7,7 @@
53e0e7
 #include "RenderCompositorSWGL.h"
53e0e7
 
53e0e7
 #include "mozilla/gfx/Logging.h"
53e0e7
+#include "mozilla/gfx/Swizzle.h"
53e0e7
 #include "mozilla/widget/CompositorWidget.h"
53e0e7
 
53e0e7
 #ifdef MOZ_WIDGET_GTK
53e0e7
@@ -235,6 +237,13 @@ void RenderCompositorSWGL::CommitMappedB
53e0e7
   }
53e0e7
   mDT->Flush();
53e0e7
 
53e0e7
+#if MOZ_BIG_ENDIAN()
53e0e7
+  // One swizzle to rule them all.
53e0e7
+  gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8,
53e0e7
+                   mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8,
53e0e7
+                   mDT->GetSize());
53e0e7
+#endif
53e0e7
+
53e0e7
   // Done with the DT. Hand it back to the widget and clear out any trace of it.
53e0e7
   mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion);
53e0e7
   mDirtyRegion.SetEmpty();