diff options
Diffstat (limited to '0007-imported-patch-one_swizzle_to_rule_them_all.patch.patch')
-rw-r--r-- | 0007-imported-patch-one_swizzle_to_rule_them_all.patch.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/0007-imported-patch-one_swizzle_to_rule_them_all.patch.patch b/0007-imported-patch-one_swizzle_to_rule_them_all.patch.patch new file mode 100644 index 000000000000..fcd04a935ffc --- /dev/null +++ b/0007-imported-patch-one_swizzle_to_rule_them_all.patch.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "M. Sirringhaus" <msirringhaus@suse.de> +Date: Tue, 22 Feb 2022 09:24:46 +0100 +Subject: [PATCH] imported patch one_swizzle_to_rule_them_all.patch + +--- + gfx/webrender_bindings/RenderCompositorSWGL.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bindings/RenderCompositorSWGL.cpp +index d767ff83f7718097e95883cbfdee31dea6cb198a..9146005c8b9dafee9ed0ea40ace3e71db9509e6d 100644 +--- a/gfx/webrender_bindings/RenderCompositorSWGL.cpp ++++ b/gfx/webrender_bindings/RenderCompositorSWGL.cpp +@@ -7,6 +7,7 @@ + #include "RenderCompositorSWGL.h" + + #include "mozilla/gfx/Logging.h" ++#include "mozilla/gfx/Swizzle.h" + #include "mozilla/widget/CompositorWidget.h" + + #ifdef MOZ_WIDGET_GTK +@@ -242,6 +243,13 @@ void RenderCompositorSWGL::CommitMappedBuffer(bool aDirty) { + } + mDT->Flush(); + ++#if MOZ_BIG_ENDIAN() ++ // One swizzle to rule them all. ++ gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8, ++ mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8, ++ mDT->GetSize()); ++#endif ++ + // Done with the DT. Hand it back to the widget and clear out any trace of it. + mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion); + mDirtyRegion.SetEmpty(); |