summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/thunderbird/APKBUILD10
-rw-r--r--user/thunderbird/js-endian.patch33
-rw-r--r--user/thunderbird/skia-unified.patch813
-rw-r--r--user/thunderbird/webrender.patch28
4 files changed, 816 insertions, 68 deletions
diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD
index c137c78fe..4a19b165a 100644
--- a/user/thunderbird/APKBUILD
+++ b/user/thunderbird/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=thunderbird
-pkgver=128.1.0
+pkgver=128.4.0
pkgrel=0
_llvmver=18
pkgdesc="Email client from Mozilla"
@@ -33,6 +33,7 @@ source="https://archive.mozilla.org/pub/thunderbird/releases/$_tbver/source/thun
fix-seccomp-bpf.patch
icu-75.patch
jpeg-link.patch
+ js-endian.patch
mozilla-build-arm.patch
pmmx-double-format.patch
ppc32-fix.patch
@@ -152,21 +153,22 @@ package() {
${pkgdir}/usr/share/applications/thunderbird.desktop
}
-sha512sums="cda64afee45ae20a627116f9475cc4421262db40a7efa09eeafcb6e96f8fad97e8c96e2ecf04466ac4bce99fcebe0c3ce9953fa3fc4f5a92ab6f60e122f58c9a thunderbird-128.1.0esr.source.tar.xz
+sha512sums="ad031b3a9b738598358cead23cf8438435016222cd9a474c31892dc1b3db43d2d5d3a10c9639df770dc76eb3c0bc9db8be8beab84828d54ee50fc1e03f0da0a5 thunderbird-128.4.0esr.source.tar.xz
fec4e343db973f90a38cc86e145c8ab0c8bec8f6eed36ff47f9986b154ea44f0e72ea1b5c9862e772505b3371dc0a9265fa1a6bed59007a5845a1dc622fce4e8 mozconfig
1fff71be77aa34791ef8aa972b5dc5f131d79f4b895ebbfb59bc223078764d6f79c82a3a4e4c717a3893ecbe4907d556f27e97d2692e41f02365f06da759a71a bad-google-code.patch
5e6c3fa027052cc43ba161cf5c12016b07723e7c0b002a42431bbd5d716d512d5245ab6befbb56c37c7d244441533f810f4e7b583f83bbe965981931f1435a94 fix-mutex-build.patch
9f2892eff9d09f3eed1f9a9ee98ba9c6a6826c30ccdeabfefb8733abc98e7b612418827262423568e830c6354a2b8242f471bc200b7079f21862bb00947da716 fix-seccomp-bpf.patch
0a84e8cb6604fdb7601745b60c04ee74733632ada32bfd85eb32db8fee095cfb79c82033e5e3cf3bbc7b7f4df753e86ffe18e26e63a6603a93c3bb5a459aabd3 icu-75.patch
a2400c8df888637d9ebe33d82dc2fb95792685c9938b5486230a5c15bc819cbb850a2bdcb54a775516652fc8ffd6b40f8c591ab7941211f9516064101380ebbf jpeg-link.patch
+d40e6c1a6e62d5e1dc350dc0bbaf2b8488b19ea0911532784f1df1199a7a5af0aae81b0b0d77c4398a2d903d86b5560f4442386eb446d9af8d58e73eea475e4f js-endian.patch
9f5730ee3a29b86786089abcfffab32bf2210f1a1ec43260ae824a08acda687dbfa37306b82a4978dd022bcf747eab155f7f3c5f73a1375f1c3c4fcd106dae3e mozilla-build-arm.patch
1864c6c63c647f3ed1b3ca4df7f52a2c7ec4c65f2e067a9842d24a242f01e047d59ffbf88ad3740d830df1eb0bade929e245e640db135fe14f4c0d879269cb7e pmmx-double-format.patch
06a3f4ee6d3726adf3460952fcbaaf24bb15ef8d15b3357fdd1766c7a62b00bd53a1e943b5df7f4e1a69f4fae0d44b64fae1e027d7812499c77894975969ea10 ppc32-fix.patch
e1c8a85c46a9cc804eb6b5946d35b63fa2cfc7ad8b4f250c5eaf1b590b139a66d9a833246bc26ae2e340fffb81b6761cf51c600181895bd49feb9a3b8fbfe331 rust-32bit.patch
c2248297df00633771da7e6b9f2caba3dd5108d93617f652fa8b2fb4e6975821e5fee866c00713f8fce08e760fa456e2dd19a8ef7370e5a2c65dc09614526be9 shut-up-warning.patch
11f7ce86376b54281082fa5b9d3fefee8046eabe38a0ec17266764b4f62cb90f4744245c1ca93d73ed74cf81c066dab7ddcb3fe9704be8f91e0a2a4f664b203a skia-endian.patch
-79c0ca37cbb6ebffe8d59d5955045cf2d8016c1f81d6cc8fceb1474849079b927c8163e9ca6ba4e88c27193e270aaba3ac76ea9dcf19c3be49322c6d049c903b skia-unified.patch
+8e155e5a883e26c9bc67b7d45ca7d36813b07723e0eff9d7bc5b696b6412354906bd645cd890b54de2af19c1f205ea7991bd32cde1a669224beedf539b93bd56 skia-unified.patch
9df89366bd51670f534591e4c169186703ad3166a493f522e58f129fb79af375d71baaf0f6b238126792118a2d3ed0f011b010e39497ab5901ee5bea63a84fa2 stackwalk-x86-ppc.patch
-ebdc82ee06a0b649631758d9bb5a2c082e9e04dab06a633a7f0c00fad0fb6751d4b768f7ce3fe57f15e08144f26d91fc33229a1db87cdc683b37e1d0485ce76a webrender.patch
+e1d9e30a1c8d1c6bdd3530183400d7d245e437ce18bb5b262bec1d01932b02b8eaededd892efcdd277eaccb357aede4537972382be9f00eedf1785acebbd1ca6 webrender.patch
ed78e15030d79b10026ebae26e44a68d16c2a8567082072b5099b0dde4f79ae217a21737e0d9c7ec6a3cc99de3ab3c9083cca7d82889d559bb18cc15fa7e6f2a without-jit.patch
95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop"
diff --git a/user/thunderbird/js-endian.patch b/user/thunderbird/js-endian.patch
new file mode 100644
index 000000000..44f21d2d1
--- /dev/null
+++ b/user/thunderbird/js-endian.patch
@@ -0,0 +1,33 @@
+# HG changeset patch
+# User A. Wilcox <AWilcox@Wilcox-Tech.com>
+# Date 1729710191 18000
+# Wed Oct 23 14:03:11 2024 -0500
+# Node ID 6102585e0d752de1729135d4c7d917e751b268c5
+# Parent 61f7d9c0998e2ce8008cd15b187f86dfdba21a26
+Bug 1926667 - Ensure JSStructuredCloneReader::readTransferMap respects endianness r?sfink
+
+Differential Revision: https://phabricator.services.mozilla.com/D226707
+
+diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp
+--- a/js/src/vm/StructuredClone.cpp
++++ b/js/src/vm/StructuredClone.cpp
+@@ -3387,7 +3387,8 @@ bool JSStructuredCloneReader::readTransf
+ }
+
+ headerPos.write(
+- PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRING));
++ NativeEndian::swapToLittleEndian(
++ PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRING)));
+
+ uint64_t numTransferables;
+ MOZ_ALWAYS_TRUE(in.readPair(&tag, &data));
+@@ -3512,7 +3513,8 @@ bool JSStructuredCloneReader::readTransf
+ MOZ_ASSERT(TransferableMapHeader(data) == SCTAG_TM_TRANSFERRING);
+ #endif
+ headerPos.write(
+- PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRED));
++ NativeEndian::swapToLittleEndian(
++ PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRED)));
+
+ return true;
+ }
diff --git a/user/thunderbird/skia-unified.patch b/user/thunderbird/skia-unified.patch
index ad0f6d42b..cf74c1dcd 100644
--- a/user/thunderbird/skia-unified.patch
+++ b/user/thunderbird/skia-unified.patch
@@ -1,45 +1,786 @@
---- firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp
-+++ firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp
-@@ -155,8 +155,12 @@ }
- return surfaceBounds.Intersect(bounds);
+This patch is not complete.
+
+It attempts to completely remove endian-specific surface formats from the
+entire tree, then replace it with a single swizzle in Skia.
+
+Most things are working, including most Web sites and graphics. However,
+notably, native widgets (like menus, or 'Remember password?' popups) cause
+an assertion failure.
+
+We need to ship beta6 and this gets people a browser with many unfortunate
+caveats, which is better than no browser at all.
+
+I intend to remain working with upstream on finding a way forward with the
+overall idea of this patch and hope to land something eventually.
+
+diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
+--- a/dom/canvas/CanvasRenderingContext2D.cpp
++++ b/dom/canvas/CanvasRenderingContext2D.cpp
+@@ -383,7 +383,7 @@ class AdjustedTargetForFilter {
+ }
+
+ if (!mFinalTarget->CanCreateSimilarDrawTarget(mSourceGraphicRect.Size(),
+- SurfaceFormat::B8G8R8A8)) {
++ SurfaceFormat::OS_RGBA)) {
+ mTarget = mFinalTarget;
+ mCtx = nullptr;
+ mFinalTarget = nullptr;
+@@ -391,7 +391,7 @@ class AdjustedTargetForFilter {
+ }
+
+ mTarget = mFinalTarget->CreateSimilarDrawTarget(mSourceGraphicRect.Size(),
+- SurfaceFormat::B8G8R8A8);
++ SurfaceFormat::OS_RGBA);
+
+ if (mTarget) {
+ // See bug 1524554.
+@@ -419,7 +419,7 @@ class AdjustedTargetForFilter {
+ }
+
+ RefPtr<DrawTarget> dt = mFinalTarget->CreateSimilarDrawTarget(
+- aRect.Size(), SurfaceFormat::B8G8R8A8);
++ aRect.Size(), SurfaceFormat::OS_RGBA);
+
+ if (dt) {
+ // See bug 1524554.
+@@ -516,7 +516,7 @@ class AdjustedTargetForShadow {
+ bounds.RoundOut();
+ if (!bounds.ToIntRect(&mTempRect) ||
+ !mFinalTarget->CanCreateSimilarDrawTarget(mTempRect.Size(),
+- SurfaceFormat::B8G8R8A8)) {
++ SurfaceFormat::OS_RGBA)) {
+ mTarget = mFinalTarget;
+ mCtx = nullptr;
+ mFinalTarget = nullptr;
+@@ -524,7 +524,7 @@ class AdjustedTargetForShadow {
+ }
+
+ mTarget = mFinalTarget->CreateShadowDrawTarget(
+- mTempRect.Size(), SurfaceFormat::B8G8R8A8, mSigma);
++ mTempRect.Size(), SurfaceFormat::OS_RGBA, mSigma);
+
+ if (mTarget) {
+ // See bug 1524554.
+@@ -2117,7 +2117,7 @@ CanvasRenderingContext2D::GetOptimizedSn
+ }
+
+ SurfaceFormat CanvasRenderingContext2D::GetSurfaceFormat() const {
+- return mOpaque ? SurfaceFormat::B8G8R8X8 : SurfaceFormat::B8G8R8A8;
++ return mOpaque ? SurfaceFormat::OS_RGBX : SurfaceFormat::OS_RGBA;
}
+ //
+@@ -5295,7 +5295,7 @@ static already_AddRefed<SourceSurface> E
+ }
+
+ RefPtr<DrawTarget> subrectDT = aTargetDT->CreateSimilarDrawTarget(
+- roundedOutSourceRectInt.Size(), SurfaceFormat::B8G8R8A8);
++ roundedOutSourceRectInt.Size(), SurfaceFormat::OS_RGBA);
+
+ if (subrectDT) {
+ // See bug 1524554.
+@@ -6061,7 +6061,7 @@ void CanvasRenderingContext2D::DrawWindo
+ }
+ }
+ drawDT = gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
+- dtSize, SurfaceFormat::B8G8R8A8);
++ dtSize, SurfaceFormat::OS_RGBA);
+ if (!drawDT || !drawDT->IsValid()) {
+ aError.Throw(NS_ERROR_FAILURE);
+ return;
+@@ -6315,7 +6315,7 @@ void CanvasRenderingContext2D::EnsureErr
+
+ RefPtr<DrawTarget> errorTarget =
+ gfxPlatform::GetPlatform()->CreateOffscreenCanvasDrawTarget(
+- IntSize(1, 1), SurfaceFormat::B8G8R8A8);
++ IntSize(1, 1), SurfaceFormat::OS_RGBA);
+ MOZ_ASSERT(errorTarget, "Failed to allocate the error target!");
+
+ sErrorTarget.set(errorTarget.forget().take());
+@@ -6437,7 +6437,7 @@ void CanvasRenderingContext2D::PutImageD
+ dstData = lockedBits + dirtyRect.y * dstStride + dirtyRect.x * 4;
+ } else {
+ sourceSurface = Factory::CreateDataSourceSurface(
+- dirtyRect.Size(), SurfaceFormat::B8G8R8A8, false);
++ dirtyRect.Size(), SurfaceFormat::OS_RGBA, false);
+
+ // In certain scenarios, requesting larger than 8k image fails. Bug
+ // 803568 covers the details of how to run into it, but the full
+diff --git a/dom/canvas/ImageBitmap.cpp b/dom/canvas/ImageBitmap.cpp
+--- a/dom/canvas/ImageBitmap.cpp
++++ b/dom/canvas/ImageBitmap.cpp
+@@ -227,7 +227,7 @@ static already_AddRefed<DataSourceSurfac
+ // this rectangle are outside the area where the input bitmap was placed, then
+ // they will be transparent black in output."
+ // So, instead, we force the output format to be SurfaceFormat::B8G8R8A8.
+- const SurfaceFormat format = SurfaceFormat::B8G8R8A8;
++ const SurfaceFormat format = SurfaceFormat::OS_RGBA;
+ const int bytesPerPixel = BytesPerPixel(format);
+ const IntSize dstSize =
+ IntSize(positiveCropRect.width, positiveCropRect.height);
+@@ -500,6 +500,11 @@ static already_AddRefed<layers::Image> C
+
+ // Convert RGBA to BGRA
+ RefPtr<DataSourceSurface> rgbaDataSurface = rgbaSurface->GetDataSurface();
++
++ if (SurfaceFormat::OS_RGBA == SurfaceFormat::R8G8B8A8) {
++ return CreateImageFromSurface(rgbaDataSurface);
++ }
++
+ DataSourceSurface::ScopedMap rgbaMap(rgbaDataSurface,
+ DataSourceSurface::READ);
+ if (NS_WARN_IF(!rgbaMap.IsMapped())) {
+@@ -724,7 +729,7 @@ SurfaceFromElementResult ImageBitmap::Su
+ bool requiresCrop = !allowUncropped && hasCropRect;
+ if (wantExactSize || requiresPremult || requiresCrop || mSurface) {
+ RefPtr<DrawTarget> dt = Factory::CreateDrawTarget(
+- BackendType::SKIA, IntSize(1, 1), SurfaceFormat::B8G8R8A8);
++ BackendType::SKIA, IntSize(1, 1), SurfaceFormat::OS_RGBA);
+ sfer.mSourceSurface = PrepareForDrawTarget(dt);
+
+ if (!sfer.mSourceSurface) {
+@@ -831,7 +836,7 @@ already_AddRefed<SourceSurface> ImageBit
+ // black, even if the surface is opaque, so force to an alpha format in
+ // that case.
+ if (!surfPortion.IsEqualEdges(mPictureRect) && isOpaque) {
+- format = SurfaceFormat::B8G8R8A8;
++ format = SurfaceFormat::OS_RGBA;
+ }
+
+ // If we need to pre-multiply the alpha, then we need to be able to
+diff --git a/dom/canvas/OffscreenCanvasDisplayHelper.cpp b/dom/canvas/OffscreenCanvasDisplayHelper.cpp
+--- a/dom/canvas/OffscreenCanvasDisplayHelper.cpp
++++ b/dom/canvas/OffscreenCanvasDisplayHelper.cpp
+@@ -181,7 +181,7 @@ bool OffscreenCanvasDisplayHelper::Commi
+
+ MutexAutoLock lock(mMutex);
+
+- gfx::SurfaceFormat format = gfx::SurfaceFormat::B8G8R8A8;
++ gfx::SurfaceFormat format = gfx::SurfaceFormat::OS_RGBA;
+ layers::TextureFlags flags = layers::TextureFlags::IMMUTABLE;
+
+ if (!mCanvasElement) {
+@@ -207,7 +207,7 @@ bool OffscreenCanvasDisplayHelper::Commi
+
+ if (mData.mIsOpaque) {
+ flags |= layers::TextureFlags::IS_OPAQUE;
+- format = gfx::SurfaceFormat::B8G8R8X8;
++ format = gfx::SurfaceFormat::OS_RGBX;
+ } else if (!mData.mIsAlphaPremult) {
+ flags |= layers::TextureFlags::NON_PREMULTIPLIED;
+ }
+diff --git a/gfx/2d/HelpersSkia.h b/gfx/2d/HelpersSkia.h
+--- a/gfx/2d/HelpersSkia.h
++++ b/gfx/2d/HelpersSkia.h
+@@ -26,6 +26,9 @@ namespace gfx {
+ static inline SkColorType GfxFormatToSkiaColorType(SurfaceFormat format) {
+ switch (format) {
+ case SurfaceFormat::B8G8R8A8:
+#if MOZ_BIG_ENDIAN()
-+static const int kARGBAlphaOffset = 0;
-+#else
- static const int kARGBAlphaOffset =
- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
++ //MOZ_DIAGNOSTIC_ASSERT(false, "wrong way unsupported by Skia");
+#endif
+ return kBGRA_8888_SkColorType;
+ case SurfaceFormat::B8G8R8X8:
+ // We probably need to do something here.
+@@ -37,7 +40,9 @@ static inline SkColorType GfxFormatToSki
+ case SurfaceFormat::R8G8B8A8:
+ return kRGBA_8888_SkColorType;
+ case SurfaceFormat::A8R8G8B8:
++#if MOZ_LITTLE_ENDIAN()
+ MOZ_DIAGNOSTIC_ASSERT(false, "A8R8G8B8 unsupported by Skia");
++#endif
+ return kRGBA_8888_SkColorType;
+ default:
+ MOZ_DIAGNOSTIC_ASSERT(false, "Unknown surface format");
+@@ -49,20 +54,20 @@ static inline SurfaceFormat SkiaColorTyp
+ SkColorType aColorType, SkAlphaType aAlphaType = kPremul_SkAlphaType) {
+ switch (aColorType) {
+ case kBGRA_8888_SkColorType:
+- return aAlphaType == kOpaque_SkAlphaType ? SurfaceFormat::B8G8R8X8
+- : SurfaceFormat::B8G8R8A8;
++ return aAlphaType == kOpaque_SkAlphaType ? SurfaceFormat::OS_RGBX
++ : SurfaceFormat::OS_RGBA;
+ case kRGB_565_SkColorType:
+ return SurfaceFormat::R5G6B5_UINT16;
+ case kAlpha_8_SkColorType:
+ return SurfaceFormat::A8;
+ default:
+- return SurfaceFormat::B8G8R8A8;
++ return SurfaceFormat::OS_RGBA;
+ }
+ }
- static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
- const int32_t aStride, SurfaceFormat aFormat) {
-# HG changeset patch
-# Parent 46ea866ca3acb8bb5e1709ceb799b9c94f591dec
-Problem description: Tab-titles that are too long to fit into a tab get faded out.
- On big endian this is broken and instead of fading out, the
- tab gets white and the font transparent, leading to an unreadable
- tab-title
-Solution: This is not a real solution, but a hack. The real solution would have been
- to byte-swap the correct buffer, but I could not find it.
- So the next best thing is to deactivate the fading-effect. Now all tab-titles
- are readable, albeit not as pretty to look at as they could be.
-Side-effects: I have not yet found an unwanted side-effect.
-
-diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
---- a/gfx/2d/DrawTargetSkia.cpp Tue Oct 22 12:27:22 2019 +0200
-+++ b/gfx/2d/DrawTargetSkia.cpp Thu Oct 31 09:11:56 2019 +0100
-@@ -2011,6 +2011,14 @@
- SkCanvas::kPreserveLCDText_SaveLayerFlag |
- (aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0));
+ static inline SkAlphaType GfxFormatToSkiaAlphaType(SurfaceFormat format) {
+ switch (format) {
+- case SurfaceFormat::B8G8R8X8:
++ case SurfaceFormat::OS_RGBX:
+ case SurfaceFormat::R5G6B5_UINT16:
+ return kOpaque_SkAlphaType;
+ default:
+diff --git a/gfx/ipc/CrossProcessPaint.cpp b/gfx/ipc/CrossProcessPaint.cpp
+--- a/gfx/ipc/CrossProcessPaint.cpp
++++ b/gfx/ipc/CrossProcessPaint.cpp
+@@ -107,7 +107,7 @@ PaintFragment PaintFragment::Record(dom:
+ nsContentUtils::FlushLayoutForTree(ds->GetWindow());
+
+ // Initialize the recorder
+- SurfaceFormat format = SurfaceFormat::B8G8R8A8;
++ SurfaceFormat format = SurfaceFormat::OS_RGBA;
+ RefPtr<DrawTarget> referenceDt = Factory::CreateDrawTarget(
+ gfxPlatform::GetPlatform()->GetSoftwareBackend(), IntSize(1, 1), format);
+
+@@ -254,7 +254,7 @@ bool CrossProcessPaint::Start(dom::Windo
+ // Create the destination draw target
+ RefPtr<DrawTarget> drawTarget =
+ gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
+- root->mSize, SurfaceFormat::B8G8R8A8);
++ root->mSize, SurfaceFormat::OS_RGBA);
+ if (!drawTarget || !drawTarget->IsValid()) {
+ CPP_LOG("Couldn't create (%d x %d) surface for fragment %" PRIu64
+ ".\n",
+diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h
+--- a/gfx/ipc/GfxMessageUtils.h
++++ b/gfx/ipc/GfxMessageUtils.h
+@@ -677,7 +677,7 @@ struct ParamTraits<GeckoProcessType>
+ template <>
+ struct ParamTraits<mozilla::gfx::SurfaceFormat>
+ : public ContiguousEnumSerializer<mozilla::gfx::SurfaceFormat,
+- mozilla::gfx::SurfaceFormat::B8G8R8A8,
++ mozilla::gfx::SurfaceFormat::OS_RGBA,
+ mozilla::gfx::SurfaceFormat::UNKNOWN> {};
+
+ template <>
+diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp
+--- a/gfx/layers/Compositor.cpp
++++ b/gfx/layers/Compositor.cpp
+@@ -36,7 +36,7 @@ class CompositorRecordedFrame final : pu
+ gfx::IntSize size = mBuffer->GetSize();
+
+ mSurface = gfx::Factory::CreateDataSourceSurface(
+- size, gfx::SurfaceFormat::B8G8R8A8,
++ size, gfx::SurfaceFormat::OS_RGBA,
+ /* aZero = */ false);
+
+ if (!mBuffer->MapAndCopyInto(mSurface, size)) {
+diff --git a/gfx/layers/ImageDataSerializer.cpp b/gfx/layers/ImageDataSerializer.cpp
+--- a/gfx/layers/ImageDataSerializer.cpp
++++ b/gfx/layers/ImageDataSerializer.cpp
+@@ -288,16 +288,16 @@ already_AddRefed<DataSourceSurface> Data
+ RefPtr<DataSourceSurface> result;
+ if (aSurface) {
+ MOZ_ASSERT(aSurface->GetSize() == size);
+- MOZ_ASSERT(aSurface->GetFormat() == gfx::SurfaceFormat::B8G8R8X8);
++ MOZ_ASSERT(aSurface->GetFormat() == gfx::SurfaceFormat::OS_RGBX);
+ if (aSurface->GetSize() == size &&
+- aSurface->GetFormat() == gfx::SurfaceFormat::B8G8R8X8) {
++ aSurface->GetFormat() == gfx::SurfaceFormat::OS_RGBX) {
+ result = aSurface;
+ }
+ }
+
+ if (!result) {
+ result =
+- Factory::CreateDataSourceSurface(size, gfx::SurfaceFormat::B8G8R8X8);
++ Factory::CreateDataSourceSurface(size, gfx::SurfaceFormat::OS_RGBX);
+ }
+ if (NS_WARN_IF(!result)) {
+ return nullptr;
+@@ -320,7 +320,7 @@ already_AddRefed<DataSourceSurface> Data
+ ycbcrData.mChromaSubsampling = aDescriptor.chromaSubsampling();
+
+- gfx::ConvertYCbCrToRGB(ycbcrData, gfx::SurfaceFormat::B8G8R8X8, size,
++ gfx::ConvertYCbCrToRGB(ycbcrData, gfx::SurfaceFormat::OS_RGBX, size,
+ map.mData, map.mStride);
+
+ result->Unmap();
+ return result.forget();
+diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp
+--- a/gfx/layers/composite/TextureHost.cpp
++++ b/gfx/layers/composite/TextureHost.cpp
+@@ -182,7 +182,7 @@ already_AddRefed<TextureHost> CreateDumm
+ aFlags &= ~TextureFlags::DEALLOCATE_CLIENT;
+ aFlags |= TextureFlags::DUMMY_TEXTURE;
+ UniquePtr<TextureData> textureData(BufferTextureData::Create(
+- gfx::IntSize(1, 1), gfx::SurfaceFormat::B8G8R8A8, gfx::BackendType::SKIA,
++ gfx::IntSize(1, 1), gfx::SurfaceFormat::OS_RGBA, gfx::BackendType::SKIA,
+ aBackend, aFlags, TextureAllocationFlags::ALLOC_DEFAULT, nullptr));
+ SurfaceDescriptor surfDesc;
+ textureData->Serialize(surfDesc);
+diff --git a/gfx/layers/ipc/SharedSurfacesChild.cpp b/gfx/layers/ipc/SharedSurfacesChild.cpp
+--- a/gfx/layers/ipc/SharedSurfacesChild.cpp
++++ b/gfx/layers/ipc/SharedSurfacesChild.cpp
+@@ -241,7 +241,7 @@ nsresult SharedSurfacesChild::ShareInter
+
+ SurfaceFormat format = aSurface->GetFormat();
+ MOZ_RELEASE_ASSERT(
+- format == SurfaceFormat::B8G8R8X8 || format == SurfaceFormat::B8G8R8A8,
++ format == SurfaceFormat::OS_RGBX || format == SurfaceFormat::OS_RGBA,
+ "bad format");
+
+ data->MarkShared(manager->GetNextExternalImageId());
+diff --git a/gfx/layers/wr/WebRenderLayerManager.cpp b/gfx/layers/wr/WebRenderLayerManager.cpp
+--- a/gfx/layers/wr/WebRenderLayerManager.cpp
++++ b/gfx/layers/wr/WebRenderLayerManager.cpp
+@@ -512,7 +512,7 @@ void WebRenderLayerManager::MakeSnapshot
+ #ifdef MOZ_WIDGET_ANDROID
+ SurfaceFormat::R8G8B8A8;
+ #else
+- SurfaceFormat::B8G8R8A8;
++ SurfaceFormat::OS_RGBA;
+ #endif
+ RefPtr<TextureClient> texture = TextureClient::CreateForRawBufferAccess(
+ WrBridge(), format, aSize.ToUnknownSize(), BackendType::SKIA,
+diff --git a/gfx/layers/wr/WebRenderTextureHost.cpp b/gfx/layers/wr/WebRenderTextureHost.cpp
+--- a/gfx/layers/wr/WebRenderTextureHost.cpp
++++ b/gfx/layers/wr/WebRenderTextureHost.cpp
+@@ -159,7 +159,7 @@ int32_t WebRenderTextureHost::GetRGBStri
+ // XXX this stride is used until yuv image rendering by webrender is used.
+ // Software converted RGB buffers strides are aliened to 16
+ return gfx::GetAlignedStride<16>(
+- GetSize().width, BytesPerPixel(gfx::SurfaceFormat::B8G8R8A8));
++ GetSize().width, BytesPerPixel(gfx::SurfaceFormat::OS_RGBA));
+ }
+ return ImageDataSerializer::ComputeRGBStride(format, GetSize().width);
+ }
+diff --git a/gfx/thebes/gfx2DGlue.h b/gfx/thebes/gfx2DGlue.h
+--- a/gfx/thebes/gfx2DGlue.h
++++ b/gfx/thebes/gfx2DGlue.h
+@@ -68,9 +68,9 @@ inline gfxRect ThebesRect(const RectDoub
+
+ inline gfxImageFormat SurfaceFormatToImageFormat(SurfaceFormat aFormat) {
+ switch (aFormat) {
+- case SurfaceFormat::B8G8R8A8:
++ case SurfaceFormat::OS_RGBA:
+ return SurfaceFormat::A8R8G8B8_UINT32;
+- case SurfaceFormat::B8G8R8X8:
++ case SurfaceFormat::OS_RGBX:
+ return SurfaceFormat::X8R8G8B8_UINT32;
+ case SurfaceFormat::R5G6B5_UINT16:
+ return SurfaceFormat::R5G6B5_UINT16;
+@@ -84,16 +84,16 @@ inline gfxImageFormat SurfaceFormatToIma
+ inline SurfaceFormat ImageFormatToSurfaceFormat(gfxImageFormat aFormat) {
+ switch (aFormat) {
+ case SurfaceFormat::A8R8G8B8_UINT32:
+- return SurfaceFormat::B8G8R8A8;
++ return SurfaceFormat::OS_RGBA;
+ case SurfaceFormat::X8R8G8B8_UINT32:
+- return SurfaceFormat::B8G8R8X8;
++ return SurfaceFormat::OS_RGBX;
+ case SurfaceFormat::R5G6B5_UINT16:
+ return SurfaceFormat::R5G6B5_UINT16;
+ case SurfaceFormat::A8:
+ return SurfaceFormat::A8;
+ default:
+ case SurfaceFormat::UNKNOWN:
+- return SurfaceFormat::B8G8R8A8;
++ return SurfaceFormat::OS_RGBA;
+ }
+ }
+
+@@ -102,9 +102,11 @@ inline gfxContentType ContentForFormat(c
+ case SurfaceFormat::R5G6B5_UINT16:
+ case SurfaceFormat::B8G8R8X8:
+ case SurfaceFormat::R8G8B8X8:
++ case SurfaceFormat::OS_RGBX:
+ return gfxContentType::COLOR;
+ case SurfaceFormat::A8:
+ return gfxContentType::ALPHA;
++ case SurfaceFormat::OS_RGBA:
+ case SurfaceFormat::B8G8R8A8:
+ case SurfaceFormat::R8G8B8A8:
+ default:
+diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
+--- a/gfx/thebes/gfxPlatform.cpp
++++ b/gfx/thebes/gfxPlatform.cpp
+@@ -987,7 +987,7 @@ void gfxPlatform::Init() {
+
+ gPlatform->mScreenReferenceDrawTarget =
+ gPlatform->CreateOffscreenContentDrawTarget(IntSize(1, 1),
+- SurfaceFormat::B8G8R8A8);
++ SurfaceFormat::OS_RGBA);
+ if (!gPlatform->mScreenReferenceDrawTarget ||
+ !gPlatform->mScreenReferenceDrawTarget->IsValid()) {
+ // If TDR is detected, create a draw target with software backend
+diff --git a/gfx/thebes/gfxPlatformWorker.cpp b/gfx/thebes/gfxPlatformWorker.cpp
+--- a/gfx/thebes/gfxPlatformWorker.cpp
++++ b/gfx/thebes/gfxPlatformWorker.cpp
+@@ -64,7 +64,7 @@ RefPtr<mozilla::gfx::DrawTarget>
+ gfxPlatformWorker::ScreenReferenceDrawTarget() {
+ if (!mScreenReferenceDrawTarget) {
+ mScreenReferenceDrawTarget = Factory::CreateDrawTarget(
+- BackendType::SKIA, IntSize(1, 1), SurfaceFormat::B8G8R8A8);
++ BackendType::SKIA, IntSize(1, 1), SurfaceFormat::OS_RGBA);
+ }
+ return mScreenReferenceDrawTarget;
+ }
+diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp
+--- a/gfx/thebes/gfxUtils.cpp
++++ b/gfx/thebes/gfxUtils.cpp
+@@ -1082,10 +1082,10 @@ nsresult gfxUtils::EncodeSourceSurfaceAs
+ }
+
+ RefPtr<DataSourceSurface> dataSurface;
+- if (aSurface->GetFormat() != SurfaceFormat::B8G8R8A8) {
++ if (aSurface->GetFormat() != SurfaceFormat::OS_RGBA) {
+ // FIXME bug 995807 (B8G8R8X8), bug 831898 (R5G6B5)
+ dataSurface = gfxUtils::CopySurfaceToDataSourceSurfaceWithFormat(
+- aSurface, SurfaceFormat::B8G8R8A8);
++ aSurface, SurfaceFormat::OS_RGBA);
+ } else {
+ dataSurface = aSurface->GetDataSurface();
+ }
+diff --git a/gfx/webrender_bindings/RenderCompositorSWGL.cpp b/gfx/webrender_bindings/RenderCompositorSWGL.cpp
+--- 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
+@@ -92,8 +93,8 @@ bool RenderCompositorSWGL::AllocateMappe
+ gfx::SurfaceFormat format = gfx::SurfaceFormat::UNKNOWN;
+ if (bufferMode != layers::BufferMode::BUFFERED && !mSurface &&
+ mDT->LockBits(&data, &size, &stride, &format) &&
+- (format != gfx::SurfaceFormat::B8G8R8A8 &&
+- format != gfx::SurfaceFormat::B8G8R8X8)) {
++ (format != gfx::SurfaceFormat::OS_RGBA &&
++ format != gfx::SurfaceFormat::OS_RGBX)) {
+ // We tried to lock the DT and it succeeded, but the size or format
+ // of the data is not compatible, so just release it and fall back below...
+ mDT->ReleaseBits(data);
+@@ -127,7 +128,7 @@ bool RenderCompositorSWGL::AllocateMappe
+ size = bounds.Size().ToUnknownSize();
+ if (!mSurface || mSurface->GetSize() != size) {
+ mSurface = gfx::Factory::CreateDataSourceSurface(
+- size, gfx::SurfaceFormat::B8G8R8A8);
++ size, gfx::SurfaceFormat::OS_RGBA);
+ }
+ gfx::DataSourceSurface::MappedSurface map = {nullptr, 0};
+ if (!mSurface || !mSurface->Map(gfx::DataSourceSurface::READ_WRITE, &map)) {
+@@ -242,6 +243,12 @@ void RenderCompositorSWGL::CommitMappedB
+ }
+ mDT->Flush();
+#if MOZ_BIG_ENDIAN()
-+ // Pushing a layer where an aMask is defined produces wrong output.
-+ // We _should_ endian swap the data, but I couldn't find a workable way to do so
-+ // Therefore I deactivate those layers in the meantime.
-+ // The result is: Tab-titles that are longer than the available space should be faded out.
-+ // The fading doesn't work, so we deactivate the fading-effect here.
-+ if (!aMask)
++ gfx::SwizzleData(mMappedData, mMappedStride, gfx::SurfaceFormat::B8G8R8A8,
++ mMappedData, mMappedStride, gfx::SurfaceFormat::A8R8G8B8,
++ mDT->GetSize());
+#endif
- mCanvas->saveLayer(saveRec);
++
+ // 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 a/gfx/webrender_bindings/RenderTextureHostSWGL.cpp b/gfx/webrender_bindings/RenderTextureHostSWGL.cpp
+--- a/gfx/webrender_bindings/RenderTextureHostSWGL.cpp
++++ b/gfx/webrender_bindings/RenderTextureHostSWGL.cpp
+@@ -36,8 +36,8 @@ bool RenderTextureHostSWGL::UpdatePlanes
+ }
+ GLenum internalFormat = 0;
+ switch (format) {
+- case gfx::SurfaceFormat::B8G8R8A8:
+- case gfx::SurfaceFormat::B8G8R8X8:
++ case gfx::SurfaceFormat::OS_RGBA:
++ case gfx::SurfaceFormat::OS_RGBX:
+ MOZ_ASSERT(colorDepth == gfx::ColorDepth::COLOR_8);
+ internalFormat = LOCAL_GL_RGBA8;
+ break;
+diff --git a/gfx/webrender_bindings/WebRenderTypes.h b/gfx/webrender_bindings/WebRenderTypes.h
+--- a/gfx/webrender_bindings/WebRenderTypes.h
++++ b/gfx/webrender_bindings/WebRenderTypes.h
+@@ -105,7 +105,7 @@ inline Maybe<wr::ImageFormat> SurfaceFor
+ inline gfx::SurfaceFormat ImageFormatToSurfaceFormat(ImageFormat aFormat) {
+ switch (aFormat) {
+ case ImageFormat::BGRA8:
+- return gfx::SurfaceFormat::B8G8R8A8;
++ return gfx::SurfaceFormat::OS_RGBA;
+ case ImageFormat::R8:
+ return gfx::SurfaceFormat::A8;
+ case ImageFormat::R16:
+diff --git a/image/imgTools.cpp b/image/imgTools.cpp
+--- a/image/imgTools.cpp
++++ b/image/imgTools.cpp
+@@ -425,8 +425,8 @@ static nsresult EncodeImageData(DataSour
+ const nsACString& aMimeType,
+ const nsAString& aOutputOptions,
+ nsIInputStream** aStream) {
+- MOZ_ASSERT(aDataSurface->GetFormat() == SurfaceFormat::B8G8R8A8 ||
+- aDataSurface->GetFormat() == SurfaceFormat::B8G8R8X8,
++ MOZ_ASSERT(aDataSurface->GetFormat() == SurfaceFormat::OS_RGBA ||
++ aDataSurface->GetFormat() == SurfaceFormat::OS_RGBX,
+ "We're assuming B8G8R8A8/X8");
+
+ // Get an image encoder for the media type
+@@ -474,13 +474,13 @@ imgTools::EncodeImage(imgIContainer* aCo
+
+ RefPtr<DataSourceSurface> dataSurface;
+
+- if (frame->GetFormat() == SurfaceFormat::B8G8R8A8 ||
+- frame->GetFormat() == SurfaceFormat::B8G8R8X8) {
++ if (frame->GetFormat() == SurfaceFormat::OS_RGBA ||
++ frame->GetFormat() == SurfaceFormat::OS_RGBX) {
+ dataSurface = frame->GetDataSurface();
+ } else {
+ // Convert format to SurfaceFormat::B8G8R8A8
+ dataSurface = gfxUtils::CopySurfaceToDataSourceSurfaceWithFormat(
+- frame, SurfaceFormat::B8G8R8A8);
++ frame, SurfaceFormat::OS_RGBA);
+ }
+
+ NS_ENSURE_TRUE(dataSurface, NS_ERROR_FAILURE);
+@@ -522,8 +522,8 @@ imgTools::EncodeScaledImage(imgIContaine
+
+ // If the given surface is the right size/format, we can encode it directly.
+ if (scaledSize == frame->GetSize() &&
+- (frame->GetFormat() == SurfaceFormat::B8G8R8A8 ||
+- frame->GetFormat() == SurfaceFormat::B8G8R8X8)) {
++ (frame->GetFormat() == SurfaceFormat::OS_RGBA ||
++ frame->GetFormat() == SurfaceFormat::OS_RGBX)) {
+ RefPtr<DataSourceSurface> dataSurface = frame->GetDataSurface();
+ if (dataSurface) {
+ return EncodeImageData(dataSurface, aMimeType, aOutputOptions, aStream);
+@@ -533,7 +533,7 @@ imgTools::EncodeScaledImage(imgIContaine
+ // Otherwise we need to scale it using a draw target.
+ // Ensure the surface is initialized to clear in case we need to blend to it.
+ RefPtr<DataSourceSurface> dataSurface = Factory::CreateDataSourceSurface(
+- scaledSize, SurfaceFormat::B8G8R8A8, true);
++ scaledSize, SurfaceFormat::OS_RGBA, true);
+ if (NS_WARN_IF(!dataSurface)) {
+ return NS_ERROR_FAILURE;
+ }
+@@ -545,7 +545,7 @@ imgTools::EncodeScaledImage(imgIContaine
+
+ RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(
+ BackendType::SKIA, map.GetData(), dataSurface->GetSize(), map.GetStride(),
+- SurfaceFormat::B8G8R8A8);
++ SurfaceFormat::OS_RGBA);
+ if (!dt) {
+ gfxWarning() << "imgTools::EncodeImage failed in CreateDrawTargetForData";
+ return NS_ERROR_OUT_OF_MEMORY;
+@@ -603,7 +603,7 @@ imgTools::EncodeCroppedImage(imgIContain
+ frameHeight >= aOffsetY + aHeight);
+
+ RefPtr<DataSourceSurface> dataSurface = Factory::CreateDataSourceSurface(
+- IntSize(aWidth, aHeight), SurfaceFormat::B8G8R8A8,
++ IntSize(aWidth, aHeight), SurfaceFormat::OS_RGBA,
+ /* aZero = */ true);
+ if (NS_WARN_IF(!dataSurface)) {
+ return NS_ERROR_FAILURE;
+@@ -616,7 +616,7 @@ imgTools::EncodeCroppedImage(imgIContain
+
+ RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(
+ BackendType::SKIA, map.GetData(), dataSurface->GetSize(), map.GetStride(),
+- SurfaceFormat::B8G8R8A8);
++ SurfaceFormat::OS_RGBA);
+ if (!dt) {
+ gfxWarning()
+ << "imgTools::EncodeCroppedImage failed in CreateDrawTargetForData";
+diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp
+--- a/layout/base/PresShell.cpp
++++ b/layout/base/PresShell.cpp
+@@ -5124,7 +5124,7 @@ already_AddRefed<SourceSurface> PresShel
+
+ RefPtr<DrawTarget> dt =
+ gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
+- IntSize(pixelArea.width, pixelArea.height), SurfaceFormat::B8G8R8A8);
++ IntSize(pixelArea.width, pixelArea.height), SurfaceFormat::OS_RGBA);
+ if (!dt || !dt->IsValid()) {
+ return nullptr;
+ }
+diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
+--- a/layout/base/nsLayoutUtils.cpp
++++ b/layout/base/nsLayoutUtils.cpp
+@@ -7022,9 +7022,9 @@ SurfaceFromElementResult nsLayoutUtils::
+ result.mAlphaType = gfxAlphaType::Opaque;
+ RefPtr<DrawTarget> ref =
+ aTarget ? aTarget : gfxPlatform::ThreadLocalScreenReferenceDrawTarget();
+- if (ref->CanCreateSimilarDrawTarget(size, SurfaceFormat::B8G8R8A8)) {
++ if (ref->CanCreateSimilarDrawTarget(size, SurfaceFormat::OS_RGBA)) {
+ RefPtr<DrawTarget> dt =
+- ref->CreateSimilarDrawTarget(size, SurfaceFormat::B8G8R8A8);
++ ref->CreateSimilarDrawTarget(size, SurfaceFormat::OS_RGBA);
+ if (dt) {
+ result.mSourceSurface = dt->Snapshot();
+ }
+@@ -7102,12 +7102,12 @@ SurfaceFromElementResult nsLayoutUtils::
+ : gfxPlatform::GetPlatform()
+ ->ThreadLocalScreenReferenceDrawTarget();
+ if (!ref->CanCreateSimilarDrawTarget(displaySize,
+- SurfaceFormat::B8G8R8A8)) {
++ SurfaceFormat::OS_RGBA)) {
+ return result;
+ }
+
+ RefPtr<DrawTarget> dt =
+- ref->CreateSimilarDrawTarget(displaySize, SurfaceFormat::B8G8R8A8);
++ ref->CreateSimilarDrawTarget(displaySize, SurfaceFormat::OS_RGBA);
+ if (!dt) {
+ return result;
+ }
+@@ -7380,9 +7380,9 @@ SurfaceFromElementResult nsLayoutUtils::
+ RefPtr<DrawTarget> ref =
+ aTarget ? aTarget
+ : gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
+- if (ref->CanCreateSimilarDrawTarget(size, SurfaceFormat::B8G8R8A8)) {
++ if (ref->CanCreateSimilarDrawTarget(size, SurfaceFormat::OS_RGBA)) {
+ RefPtr<DrawTarget> dt =
+- ref->CreateSimilarDrawTarget(size, SurfaceFormat::B8G8R8A8);
++ ref->CreateSimilarDrawTarget(size, SurfaceFormat::OS_RGBA);
+ if (dt) {
+ result.mSourceSurface = dt->Snapshot();
+ }
+diff --git a/layout/painting/nsCSSRenderingGradients.cpp b/layout/painting/nsCSSRenderingGradients.cpp
+--- a/layout/painting/nsCSSRenderingGradients.cpp
++++ b/layout/painting/nsCSSRenderingGradients.cpp
+@@ -1160,7 +1160,7 @@ bool nsCSSGradientRenderer::TryPaintTile
+ {
+ RefPtr<gfx::DrawTarget> tileTarget =
+ aContext.GetDrawTarget()->CreateSimilarDrawTarget(
+- tileSize, gfx::SurfaceFormat::B8G8R8A8);
++ tileSize, gfx::SurfaceFormat::OS_RGBA);
+ if (!tileTarget || !tileTarget->IsValid()) {
+ return false;
+ }
+diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp
+--- a/layout/painting/nsDisplayList.cpp
++++ b/layout/painting/nsDisplayList.cpp
+@@ -5043,7 +5043,7 @@ void nsDisplayBlendMode::Paint(nsDisplay
+ // we're going to draw to. This will include the same transform as
+ // is currently on |dt|.
+ RefPtr<DrawTarget> temp =
+- dt->CreateClippedDrawTarget(rect, SurfaceFormat::B8G8R8A8);
++ dt->CreateClippedDrawTarget(rect, SurfaceFormat::OS_RGBA);
+ if (!temp) {
+ return;
+ }
+@@ -6870,7 +6870,7 @@ void nsDisplayTransform::Paint(nsDisplay
+ RefPtr<DrawTarget> untransformedDT =
+ gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
+ IntSize(pixelBounds.Width(), pixelBounds.Height()),
+- SurfaceFormat::B8G8R8A8, true);
++ SurfaceFormat::OS_RGBA, true);
+ if (!untransformedDT || !untransformedDT->IsValid()) {
+ return;
+ }
+diff --git a/layout/painting/nsImageRenderer.cpp b/layout/painting/nsImageRenderer.cpp
+--- a/layout/painting/nsImageRenderer.cpp
++++ b/layout/painting/nsImageRenderer.cpp
+@@ -469,7 +469,7 @@ ImgDrawResult nsImageRenderer::Draw(nsPr
+ return ImgDrawResult::SUCCESS;
+ }
+ RefPtr<DrawTarget> tempDT = ctx->GetDrawTarget()->CreateSimilarDrawTarget(
+- tmpDTRect.Size(), SurfaceFormat::B8G8R8A8);
++ tmpDTRect.Size(), SurfaceFormat::OS_RGBA);
+ if (!tempDT || !tempDT->IsValid()) {
+ gfxDevCrash(LogReason::InvalidContext)
+ << "ImageRenderer::Draw problem " << gfx::hexa(tempDT);
+diff --git a/layout/svg/FilterInstance.cpp b/layout/svg/FilterInstance.cpp
+--- a/layout/svg/FilterInstance.cpp
++++ b/layout/svg/FilterInstance.cpp
+@@ -666,7 +666,7 @@ void FilterInstance::BuildSourcePaint(So
+
+ RefPtr<DrawTarget> offscreenDT =
+ gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget(
+- neededRect.Size(), SurfaceFormat::B8G8R8A8);
++ neededRect.Size(), SurfaceFormat::OS_RGBA);
+ if (!offscreenDT || !offscreenDT->IsValid()) {
+ return;
+ }
+@@ -714,7 +714,7 @@ void FilterInstance::BuildSourceImage(Dr
+ }
+
+ RefPtr<DrawTarget> offscreenDT;
+- SurfaceFormat format = SurfaceFormat::B8G8R8A8;
++ SurfaceFormat format = SurfaceFormat::OS_RGBA;
+ if (aDest->CanCreateSimilarDrawTarget(neededRect.Size(), format)) {
+ offscreenDT = aDest->CreateSimilarDrawTargetForFilter(
+ neededRect.Size(), format, aFilter, aSource, aSourceRect, Point(0, 0));
+diff --git a/layout/svg/SVGMaskFrame.cpp b/layout/svg/SVGMaskFrame.cpp
+--- a/layout/svg/SVGMaskFrame.cpp
++++ b/layout/svg/SVGMaskFrame.cpp
+@@ -68,7 +68,7 @@ already_AddRefed<SourceSurface> SVGMaskF
+ RefPtr<DrawTarget> maskDT;
+ if (maskType == StyleMaskType::Luminance) {
+ maskDT = aParams.dt->CreateClippedDrawTarget(maskSurfaceRect,
+- SurfaceFormat::B8G8R8A8);
++ SurfaceFormat::OS_RGBA);
+ } else {
+ maskDT =
+ aParams.dt->CreateClippedDrawTarget(maskSurfaceRect, SurfaceFormat::A8);
+diff --git a/layout/svg/SVGPatternFrame.cpp b/layout/svg/SVGPatternFrame.cpp
+--- a/layout/svg/SVGPatternFrame.cpp
++++ b/layout/svg/SVGPatternFrame.cpp
+@@ -370,7 +370,7 @@ already_AddRefed<SourceSurface> SVGPatte
+ }
+
+ RefPtr<DrawTarget> dt = aDrawTarget->CreateSimilarDrawTargetWithBacking(
+- surfaceSize, SurfaceFormat::B8G8R8A8);
++ surfaceSize, SurfaceFormat::OS_RGBA);
+ if (!dt || !dt->IsValid()) {
+ return nullptr;
+ }
+diff --git a/layout/svg/SVGUtils.cpp b/layout/svg/SVGUtils.cpp
+--- a/layout/svg/SVGUtils.cpp
++++ b/layout/svg/SVGUtils.cpp
+@@ -488,7 +488,7 @@ class MixModeBlender {
+
+ RefPtr<DrawTarget> targetDT =
+ mSourceCtx->GetDrawTarget()->CreateSimilarDrawTarget(
+- drawRect.Size(), SurfaceFormat::B8G8R8A8);
++ drawRect.Size(), SurfaceFormat::OS_RGBA);
+ if (!targetDT || !targetDT->IsValid()) {
+ return nullptr;
+ }
+diff --git a/widget/gtk/DMABufSurface.cpp b/widget/gtk/DMABufSurface.cpp
+--- a/widget/gtk/DMABufSurface.cpp
++++ b/widget/gtk/DMABufSurface.cpp
+@@ -948,8 +948,8 @@ bool DMABufSurfaceRGBA::HasAlpha() {
+ }
+
+ gfx::SurfaceFormat DMABufSurfaceRGBA::GetFormat() {
+- return HasAlpha() ? gfx::SurfaceFormat::B8G8R8A8
+- : gfx::SurfaceFormat::B8G8R8X8;
++ return HasAlpha() ? gfx::SurfaceFormat::OS_RGBA
++ : gfx::SurfaceFormat::OS_RGBX;
+ }
+
+ // GL uses swapped R and B components so report accordingly.
+@@ -1662,7 +1662,7 @@ DMABufSurfaceYUV::GetAsSourceSurface() {
+ LOGDMABUF(("DMABufSurfaceYUV::GetAsSourceSurface UID %d", mUID));
+
+ gfx::IntSize size(GetWidth(), GetHeight());
+- const auto format = gfx::SurfaceFormat::B8G8R8A8;
++ const auto format = gfx::SurfaceFormat::OS_RGBA;
+ RefPtr<gfx::DataSourceSurface> source =
+ gfx::Factory::CreateDataSourceSurface(size, format);
+ if (NS_WARN_IF(!source)) {
+@@ -1692,7 +1692,7 @@ nsresult DMABufSurfaceYUV::BuildSurfaceD
+ LOGDMABUF(("DMABufSurfaceYUV::BuildSurfaceDescriptorBuffer UID %d", mUID));
+
+ gfx::IntSize size(GetWidth(), GetHeight());
+- const auto format = gfx::SurfaceFormat::B8G8R8A8;
++ const auto format = gfx::SurfaceFormat::OS_RGBA;
- SetPermitSubpixelAA(aOpaque);
+ uint8_t* buffer = nullptr;
+ int32_t stride = 0;
+diff --git a/widget/gtk/WindowSurfaceX11.cpp b/widget/gtk/WindowSurfaceX11.cpp
+--- a/widget/gtk/WindowSurfaceX11.cpp
++++ b/widget/gtk/WindowSurfaceX11.cpp
+@@ -24,13 +24,13 @@ gfx::SurfaceFormat WindowSurfaceX11::Get
+ case 32:
+ if (aVisual->red_mask == 0xff0000 && aVisual->green_mask == 0xff00 &&
+ aVisual->blue_mask == 0xff) {
+- return gfx::SurfaceFormat::B8G8R8A8;
++ return gfx::SurfaceFormat::OS_RGBA;
+ }
+ break;
+ case 24:
+ if (aVisual->red_mask == 0xff0000 && aVisual->green_mask == 0xff00 &&
+ aVisual->blue_mask == 0xff) {
+- return gfx::SurfaceFormat::B8G8R8X8;
++ return gfx::SurfaceFormat::OS_RGBX;
+ }
+ break;
+ case 16:
diff --git a/user/thunderbird/webrender.patch b/user/thunderbird/webrender.patch
index 1c0d381ac..e6b145956 100644
--- a/user/thunderbird/webrender.patch
+++ b/user/thunderbird/webrender.patch
@@ -6,34 +6,6 @@
# Parent 20d81e68da033746bf81acbb08490f16679853da
Bug 1716707 [s390x] Software WebRender does not support big endian
---- firefox-128.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp
-+++ firefox-128.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp
-@@ -7,6 +7,7 @@ * file, You can obtain one at http://moz
- #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,17 @@ mDT->ReleaseBits(mMappedData);
- }
- mDT->Flush();
-
-+#if MOZ_BIG_ENDIAN()
-+ // One swizzle to rule them all.
-+ // With exception to certain text boxes with 1 line (46 pixels) and 2 lines
-+ // (64 pixels) in Firefox 115. Per following bug:
-+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1900574
-+ if ((int)mDT->GetSize().height != 46 && mDT->GetSize().height != 64)
-+ 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();
--- firefox-128.0/image/imgFrame.cpp
+++ firefox-128.0/image/imgFrame.cpp
@@ -372,6 +372,17 @@ mAborted = true;