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