aboutsummaryrefslogtreecommitdiff
path: root/www/firefox/files
diff options
context:
space:
mode:
authorChristoph Moench-Tegeder <cmt@FreeBSD.org>2022-04-13 13:14:07 +0000
committerChristoph Moench-Tegeder <cmt@FreeBSD.org>2022-04-13 13:14:07 +0000
commitf70859f0746ecf4a5dd63764560d8db752f0d2d5 (patch)
treee309374069f93dc0c17a81ce4efb394b84b2a095 /www/firefox/files
parentc0a4fa084c31c94a104f4fb45423aa0815e926aa (diff)
downloadports-f70859f0746ecf4a5dd63764560d8db752f0d2d5.tar.gz
ports-f70859f0746ecf4a5dd63764560d8db752f0d2d5.zip
www/firefox: fix color regressions after 3090fb28e
little endian actually does not need endianess fixing, it only made widgets disappear and weird colors.
Diffstat (limited to 'www/firefox/files')
-rw-r--r--www/firefox/files/patch-bug171670767
1 files changed, 32 insertions, 35 deletions
diff --git a/www/firefox/files/patch-bug1716707 b/www/firefox/files/patch-bug1716707
index 73e01ebb0eb1..33ff73450b73 100644
--- a/www/firefox/files/patch-bug1716707
+++ b/www/firefox/files/patch-bug1716707
@@ -1,30 +1,13 @@
-diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp
---- image/imgFrame.cpp
-+++ image/imgFrame.cpp
-@@ -372,6 +372,15 @@ nsresult imgFrame::InitWithDrawable(gfxD
- return NS_ERROR_OUT_OF_MEMORY;
- }
-
-+ 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);
-+ }
-+ }
-+
- if (!canUseDataSurface) {
- // We used an offscreen surface, which is an "optimized" surface from
- // imgFrame's perspective.
-# HG changeset patch
-# User M. Sirringhaus <msirringhaus@suse.de>
-# Date 1645518286 -3600
-# Tue Feb 22 09:24:46 2022 +0100
-# Node ID 494640792b4677f6462e95b90a54a4e22aeb738b
-# Parent 81832d035e101471dcf52dd91de287268add7a91
+commit ce7a2f400d4f599c72e32e2635fee7ea94c0848c
+Author: Christoph Moench-Tegeder <cmt@burggraben.net>
+Date: Wed Apr 13 14:44:46 2022 +0200
-diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bindings/RenderCompositorSWGL.cpp
+ big-endian color fixes, but without breaking little-endian
+
+ as le is what most people actually use
+
+diff --git gfx/webrender_bindings/RenderCompositorSWGL.cpp gfx/webrender_bindings/RenderCompositorSWGL.cpp
+index dbf137c849ee..243a01ff9cf3 100644
--- gfx/webrender_bindings/RenderCompositorSWGL.cpp
+++ gfx/webrender_bindings/RenderCompositorSWGL.cpp
@@ -7,6 +7,7 @@
@@ -35,15 +18,7 @@ diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bin
#include "mozilla/widget/CompositorWidget.h"
#ifdef MOZ_WIDGET_GTK
-@@ -134,6 +135,7 @@ bool RenderCompositorSWGL::AllocateMappe
- mMappedData = map.mData;
- mMappedStride = map.mStride;
- }
-+
- MOZ_ASSERT(mMappedData != nullptr && mMappedStride > 0);
- wr_swgl_init_default_framebuffer(mContext, bounds.x, bounds.y, bounds.width,
- bounds.height, mMappedStride, mMappedData);
-@@ -235,6 +237,13 @@ void RenderCompositorSWGL::CommitMappedB
+@@ -235,6 +236,13 @@ void RenderCompositorSWGL::CommitMappedBuffer(bool aDirty) {
}
mDT->Flush();
@@ -57,3 +32,25 @@ diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bin
// Done with the DT. Hand it back to the widget and clear out any trace of it.
mWidget->EndRemoteDrawingInRegion(mDT, mDirtyRegion);
mDirtyRegion.SetEmpty();
+diff --git image/imgFrame.cpp image/imgFrame.cpp
+index e58c3dd5b2d4..c1e7e77c362b 100644
+--- image/imgFrame.cpp
++++ 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.