https://bugzilla.mozilla.org/show_bug.cgi?id=1344659 --- firefox-102.1.0/gfx/2d/Types.h +++ firefox-102.1.0/gfx/2d/Types.h @@ -91,15 +91,8 @@ UNKNOWN, // The following values are endian-independent synonyms. The _UINT32 suffix // indicates that the name reflects the layout when viewed as a uint32_t // value. -#if MOZ_LITTLE_ENDIAN() A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB -#elif MOZ_BIG_ENDIAN() - A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB - X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB -#else -# error "bad endianness" -#endif // The following values are OS and endian-independent synonyms. // https://bugzilla.mozilla.org/show_bug.cgi?id=1325259 --- firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp +++ firefox-102.1.0/gfx/2d/DrawTargetSkia.cpp @@ -154,8 +154,12 @@ } return surfaceBounds.Intersect(bounds); } +#if __sparc +static const int kARGBAlphaOffset = 0; +#else static const int kARGBAlphaOffset = SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0; +#endif 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 @@ -1861,6 +1861,14 @@ SkCanvas::kPreserveLCDText_SaveLayerFlag | (aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0)); +#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) +#endif mCanvas->saveLayer(saveRec); SetPermitSubpixelAA(aOpaque);