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