diff options
Diffstat (limited to '0008-imported-patch-svg-rendering.patch.patch')
-rw-r--r-- | 0008-imported-patch-svg-rendering.patch.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/0008-imported-patch-svg-rendering.patch.patch b/0008-imported-patch-svg-rendering.patch.patch new file mode 100644 index 000000000000..9af479855e6d --- /dev/null +++ b/0008-imported-patch-svg-rendering.patch.patch @@ -0,0 +1,31 @@ +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 svg-rendering.patch + +--- + image/imgFrame.cpp | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp +index 0df40fcfa93c6c33ab4440427e6471860ab2f247..42881901004a6106f7402eb08b4af09296540654 100644 +--- a/image/imgFrame.cpp ++++ b/image/imgFrame.cpp +@@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxDrawable* aDrawable, + return NS_ERROR_OUT_OF_MEMORY; + } + ++#if MOZ_BIG_ENDIAN() ++ if (aBackend == gfx::BackendType::SKIA && canUseDataSurface) { ++ // SKIA is lying about what format it returns on big endian ++ for (int ii=0; ii < mRawSurface->GetSize().Height()*mRawSurface->Stride() / 4; ++ii) { ++ uint32_t *vals = (uint32_t*)(mRawSurface->GetData()); ++ uint32_t val = ((vals[ii] << 8) & 0xFF00FF00 ) | ((vals[ii] >> 8) & 0xFF00FF ); ++ vals[ii] = (val << 16) | (val >> 16); ++ } ++ } ++#endif ++ + if (!canUseDataSurface) { + // We used an offscreen surface, which is an "optimized" surface from + // imgFrame's perspective. |