From ebc8727216391aca453c58f8bdb27f169fe2e7d28a443ca3030470d729cd7a6a Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Thu, 21 Jul 2022 12:15:56 +0000 Subject: [PATCH 1/3] - Mozilla Thunderbird 102.0.3 Bugfixes as in * https://www.thunderbird.net/en-US/thunderbird/102.0.3/releasenotes/ - Mozilla Thunderbird 102.0.2 * https://www.thunderbird.net/en-US/thunderbird/102.0/releasenotes/ - removed obsolete patches mozilla-bmo1504834-part2.patch mozilla-bmo1504834-part4.patch mozilla-bmo1602730.patch mozilla-bmo1626236.patch mozilla-bmo1724679.patch mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch mozilla-sandbox-fips.patch - added patches inherited from FF 102 one_swizzle_to_rule_them_all.patch svg-rendering.patch - fix KDE detection (boo#1200987) in mozilla-kde.patch - requires rust = 1.60 NSPR >= 4.34 NSS >= 3.79 rust-cbindgen >= 0.23.0 - remove special breakpad debug symbol creation OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=642 --- MozillaThunderbird.changes | 31 + MozillaThunderbird.spec | 144 +- l10n-102.0.3.tar.xz | 3 + l10n-91.11.0.tar.xz | 3 - mozilla-bmo1504834-part2.patch | 112 - mozilla-bmo1504834-part4.patch | 40 - mozilla-bmo1602730.patch | 25 - mozilla-bmo1626236.patch | 85 - mozilla-bmo1724679.patch | 51 - ...wasm-emulate-arm-unaligned-fp-access.patch | 25 - mozilla-fix-top-level-asm.patch | 2 +- mozilla-kde.patch | 204 +- mozilla-libavcodec58_91.patch | 21 +- mozilla-pgo.patch | 190 ++ mozilla-reduce-rust-debuginfo.patch | 29 +- mozilla-s390-context.patch | 73 +- mozilla-sandbox-fips.patch | 49 - mozilla-silence-no-return-type.patch | 2044 ++++++----------- one_swizzle_to_rule_them_all.patch | 34 + svg-rendering.patch | 29 + tar_stamps | 12 +- thunderbird-102.0.3.source.tar.xz | 3 + thunderbird-102.0.3.source.tar.xz.asc | 16 + thunderbird-91.11.0.source.tar.xz | 3 - thunderbird-91.11.0.source.tar.xz.asc | 16 - 25 files changed, 1203 insertions(+), 2041 deletions(-) create mode 100644 l10n-102.0.3.tar.xz delete mode 100644 l10n-91.11.0.tar.xz delete mode 100644 mozilla-bmo1504834-part2.patch delete mode 100644 mozilla-bmo1504834-part4.patch delete mode 100644 mozilla-bmo1602730.patch delete mode 100644 mozilla-bmo1626236.patch delete mode 100644 mozilla-bmo1724679.patch delete mode 100644 mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch create mode 100644 mozilla-pgo.patch delete mode 100644 mozilla-sandbox-fips.patch create mode 100644 one_swizzle_to_rule_them_all.patch create mode 100644 svg-rendering.patch create mode 100644 thunderbird-102.0.3.source.tar.xz create mode 100644 thunderbird-102.0.3.source.tar.xz.asc delete mode 100644 thunderbird-91.11.0.source.tar.xz delete mode 100644 thunderbird-91.11.0.source.tar.xz.asc diff --git a/MozillaThunderbird.changes b/MozillaThunderbird.changes index b7213ac..2a9bc35 100644 --- a/MozillaThunderbird.changes +++ b/MozillaThunderbird.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Tue Jul 19 07:31:52 UTC 2022 - Wolfgang Rosenauer + +- Mozilla Thunderbird 102.0.3 + Bugfixes as in + * https://www.thunderbird.net/en-US/thunderbird/102.0.3/releasenotes/ + +------------------------------------------------------------------- +Sat Jul 9 21:53:27 UTC 2022 - Wolfgang Rosenauer + +- Mozilla Thunderbird 102.0.2 + * https://www.thunderbird.net/en-US/thunderbird/102.0/releasenotes/ +- removed obsolete patches + mozilla-bmo1504834-part2.patch + mozilla-bmo1504834-part4.patch + mozilla-bmo1602730.patch + mozilla-bmo1626236.patch + mozilla-bmo1724679.patch + mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch + mozilla-sandbox-fips.patch +- added patches inherited from FF 102 + one_swizzle_to_rule_them_all.patch + svg-rendering.patch +- fix KDE detection (boo#1200987) in mozilla-kde.patch +- requires + rust = 1.60 + NSPR >= 4.34 + NSS >= 3.79 + rust-cbindgen >= 0.23.0 +- remove special breakpad debug symbol creation + ------------------------------------------------------------------- Sun Jun 26 08:53:26 UTC 2022 - Wolfgang Rosenauer diff --git a/MozillaThunderbird.spec b/MozillaThunderbird.spec index 9086312..a9461ac 100644 --- a/MozillaThunderbird.spec +++ b/MozillaThunderbird.spec @@ -28,9 +28,9 @@ # orig_suffix b3 # major 69 # mainver %major.99 -%define major 91 -%define mainver %major.11.0 -%define orig_version 91.11.0 +%define major 102 +%define mainver %major.0.3 +%define orig_version 102.0.3 %define orig_suffix %{nil} %define update_channel release %define source_prefix thunderbird-%{orig_version} @@ -66,7 +66,7 @@ BuildArch: i686 %define gnome_dir %{_prefix} %define desktop_file_name %{progname} %define __provides_exclude ^lib.*\\.so.*$ -%define __requires_exclude ^(libmoz.*|liblgpllibs.*|libxul.*|libldap.*|libldif.*|libprldap.*)$ +%define __requires_exclude ^(libmoz.*|liblgpllibs.*|libxul.*|libldap.*|libldif.*|libprldap.*|librnp.*)$ %define localize 1 %define crashreporter 0 %define with_pipewire0_3 1 @@ -85,27 +85,31 @@ BuildRequires: autoconf213 BuildRequires: dbus-1-glib-devel BuildRequires: fdupes BuildRequires: memory-constraints -%if 0%{?suse_version} <= 1320 -BuildRequires: gcc9-c++ +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150400 +BuildRequires: gcc11-c++ %else BuildRequires: gcc-c++ %endif %if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300 -BuildRequires: cargo >= 1.51 -BuildRequires: rust >= 1.51 +BuildRequires: cargo >= 1.59 +BuildRequires: rust >= 1.59 %else # Newer sle/leap/tw use parallel versioned rust releases which have # a different method for provides that we can use to request a # specific version -BuildRequires: rust+cargo >= 1.51 +# minimal requirement: +BuildRequires: rust+cargo >= 1.59 +# actually used upstream: +BuildRequires: cargo1.60 +BuildRequires: rust1.60 %endif %if 0%{useccache} != 0 BuildRequires: ccache %endif BuildRequires: libXcomposite-devel BuildRequires: libcurl-devel -BuildRequires: mozilla-nspr-devel >= 4.32 -BuildRequires: mozilla-nss-devel >= 3.68.4 +BuildRequires: mozilla-nspr-devel >= 4.34 +BuildRequires: mozilla-nss-devel >= 3.79 BuildRequires: nasm >= 2.14 BuildRequires: nodejs >= 10.22.1 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 @@ -115,14 +119,13 @@ BuildRequires: python36 BuildRequires: python3 >= 3.5 BuildRequires: python3-devel %endif -BuildRequires: rust-cbindgen >= 0.19.0 +BuildRequires: rust-cbindgen >= 0.23.0 BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXt-devel %if 0%{?do_profiling} BuildRequires: xvfb-run %endif -BuildRequires: xz BuildRequires: yasm BuildRequires: zip %if 0%{?suse_version} < 1550 @@ -185,28 +188,24 @@ Patch1: mozilla-nongnome-proxies.patch Patch2: mozilla-kde.patch Patch3: mozilla-ntlm-full-path.patch Patch4: mozilla-aarch64-startup-crash.patch -Patch6: mozilla-sandbox-fips.patch -Patch7: mozilla-fix-aarch64-libopus.patch -Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch -Patch9: mozilla-s390-context.patch -Patch11: mozilla-reduce-rust-debuginfo.patch -Patch13: mozilla-bmo1005535.patch -Patch14: mozilla-bmo1568145.patch -Patch15: mozilla-bmo1504834-part1.patch -Patch16: mozilla-bmo1504834-part2.patch -Patch17: mozilla-bmo1504834-part3.patch -Patch19: mozilla-bmo1512162.patch -Patch20: mozilla-fix-top-level-asm.patch -Patch21: mozilla-bmo1504834-part4.patch -Patch22: mozilla-bmo849632.patch -Patch24: mozilla-bmo1602730.patch -Patch25: mozilla-bmo998749.patch -Patch26: mozilla-bmo1626236.patch -Patch27: mozilla-s390x-skia-gradient.patch -Patch28: mozilla-libavcodec58_91.patch -Patch29: mozilla-silence-no-return-type.patch -Patch30: mozilla-bmo531915.patch -Patch31: mozilla-bmo1724679.patch +Patch5: mozilla-fix-aarch64-libopus.patch +Patch6: mozilla-s390-context.patch +Patch7: mozilla-pgo.patch +Patch8: mozilla-reduce-rust-debuginfo.patch +Patch9: mozilla-bmo1005535.patch +Patch10: mozilla-bmo1568145.patch +Patch11: mozilla-bmo1504834-part1.patch +Patch12: mozilla-bmo1504834-part3.patch +Patch13: mozilla-bmo1512162.patch +Patch14: mozilla-fix-top-level-asm.patch +Patch15: mozilla-bmo849632.patch +Patch16: mozilla-bmo998749.patch +Patch17: mozilla-s390x-skia-gradient.patch +Patch18: mozilla-libavcodec58_91.patch +Patch19: mozilla-silence-no-return-type.patch +Patch20: mozilla-bmo531915.patch +Patch21: one_swizzle_to_rule_them_all.patch +Patch22: svg-rendering.patch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /bin/sh @@ -255,16 +254,6 @@ This package contains rarely used languages for the user interface of %{appname}. %endif -%if %crashreporter -%package buildsymbols -Summary: Breakpad buildsymbols for %{appname} -Group: Development/Debug - -%description buildsymbols -This subpackage contains the Breakpad created and compatible debugging -symbols meant for upload to Mozilla's crash collector database. -%endif - %if !%{with only_print_mozconfig} %prep %if %localize @@ -287,28 +276,24 @@ fi %endif %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch6 -p1 %patch7 -p1 -#%patch8 -p1 +%patch8 -p1 %patch9 -p1 +%patch10 -p1 %patch11 -p1 +%patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 %endif %build @@ -349,8 +334,8 @@ export BUILD_OFFICIAL=1 export MOZ_TELEMETRY_REPORTING=1 export MOZ_REQUIRE_SIGNING= export MACH_USE_SYSTEM_PYTHON=1 -%if 0%{?suse_version} <= 1320 -export CC=gcc-9 +%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150400 +export CC=gcc-11 %else %if 0%{?clang_build} == 0 export CC=gcc @@ -363,6 +348,8 @@ export CFLAGS="$CFLAGS -fimplicit-constexpr" %ifarch %arm %ix86 # Limit RAM usage during link export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +# A lie to prevent -Wl,--gc-sections being set which requires more memory than 32bit can offer +export GC_SECTIONS_BREAKS_DEBUG_RANGES=yes %endif export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" %ifarch ppc64 ppc64le @@ -419,8 +406,9 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 %ifarch %ix86 %arm ac_add_options --disable-debug-symbols %else -ac_add_options --enable-debug-symbols +ac_add_options --enable-debug-symbols=-g1 %endif +ac_add_options --disable-install-strip # building with elf-hack started to fail everywhere with FF73 #%if 0%{?suse_version} > 1549 %ifnarch aarch64 ppc64 ppc64le s390x @@ -441,6 +429,11 @@ ac_add_options --disable-necko-wifi ac_add_options --enable-update-channel=%{update_channel} ac_add_options --with-unsigned-addon-scopes=app ac_add_options --allow-addon-sideload +# at least temporary until the "wasi-sysroot" issue is solved +ac_add_options --without-wasm-sandboxed-libraries +%ifarch x86_64 aarch64 +ac_add_options --enable-rust-simd +%endif ac_add_options --enable-official-branding %if ! %crashreporter ac_add_options --disable-crashreporter @@ -498,6 +491,7 @@ ac_add_options --enable-application=comm/mail ac_add_options --prefix=%{_prefix} ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n ac_add_options --disable-updater +ac_add_options --without-wasm-sandboxed-libraries ac_add_options --enable-official-branding EOF mkdir -p $RPM_BUILD_DIR/langpacks_artifacts/ @@ -510,19 +504,15 @@ sed -r '/^(ja-JP-mac|en-US|$)/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/comm/m export MOZCONFIG=${MOZCONFIG}_$locale # nsinstall is needed for langpack-build. It is already built by `./mach build`, but building it again is very fast ./mach build config/nsinstall langpack-$locale - cp -rL ../obj_$locale/dist/xpi-stage/locale-$locale \ - $RPM_BUILD_DIR/langpacks_artifacts/langpack-$locale@thunderbird.mozilla.org - rm -rf $RPM_BUILD_DIR/langpacks_artifacts/langpack-$locale@thunderbird.mozilla.org/defaults - rm -rf $RPM_BUILD_DIR/langpacks_artifacts/langpack-$locale@thunderbird.mozilla.org/hyphenation - # Build systems like to run out of disc-space, so we delete the build-dir here (we copied already all relevant files) - rm -rf ../obj_$locale/ + cp -L ../obj_$locale/dist/linux-*/xpi/thunderbird-%{orig_version}.$locale.langpack.xpi \ + $RPM_BUILD_DIR/langpacks_artifacts/langpack-$locale@thunderbird.mozilla.org.xpi # check against the fixed common list and sort into the right filelist _matched=0 for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do [ "$_match" = "$locale" ] && _matched=1 done [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other - echo %{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org \ + echo %{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org.xpi \ >> %{_tmppath}/translations.$_l10ntarget ' -- {} %endif @@ -608,24 +598,6 @@ rm -f %{buildroot}%{progdir}/nspr-config %fdupes %{buildroot}%{progdir} %fdupes %{buildroot}%{_libdir}/mozilla %fdupes %{buildroot}%{_datadir} -# create breakpad debugsymbols -%if %crashreporter -SYMBOLS_NAME="thunderbird-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" -make buildsymbols \ - SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ - SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ - SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" -if [ -e dist/*symbols.zip ]; then - mkdir -p %{buildroot}%{_datadir}/mozilla/ - cp dist/*symbols.zip %{buildroot}%{_datadir}/mozilla/ -fi -%endif - -%clean -rm -rf %{buildroot} -%if %localize -rm -rf %{_tmppath}/translations.* -%endif %post %desktop_database_post @@ -649,6 +621,8 @@ exit 0 %{progdir}/pingsender %{progdir}/platform.ini %{progdir}/plugin-container +%{progdir}/rnp-cli +%{progdir}/rnpkeys %{progdir}/thunderbird-bin # crashreporter files %if %crashreporter @@ -677,10 +651,4 @@ exit 0 %dir %{progdir}/extensions/ %endif -%if %crashreporter -%files buildsymbols -%defattr(-,root,root) -%{_datadir}/mozilla/ -%endif - %changelog diff --git a/l10n-102.0.3.tar.xz b/l10n-102.0.3.tar.xz new file mode 100644 index 0000000..58314a6 --- /dev/null +++ b/l10n-102.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d55006f607d469bcb0761e6975e503c6d5bdefcbfa3c70042862d5e1901bc2b4 +size 29285312 diff --git a/l10n-91.11.0.tar.xz b/l10n-91.11.0.tar.xz deleted file mode 100644 index 0131622..0000000 --- a/l10n-91.11.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:485a8e58506f1fdf016dc6655b3546ab5561c1ab418b6e9df690de80f6c70b46 -size 28946816 diff --git a/mozilla-bmo1504834-part2.patch b/mozilla-bmo1504834-part2.patch deleted file mode 100644 index 4d25a1f..0000000 --- a/mozilla-bmo1504834-part2.patch +++ /dev/null @@ -1,112 +0,0 @@ -# HG changeset patch -# Parent 9319844dca3133fa8bd7107079f1d1ddc5c0bf70 -Skia does not support big endian. The places to fix are too numerous and upstream (skia, not Mozilla) -has no interest in maintaining big endian. -So here we try to swizzle the input for skia, so that skia always works on LE, and when it comes -out again, we transform back to BE. - -diff --git a/gfx/2d/ConvolutionFilter.cpp b/gfx/2d/ConvolutionFilter.cpp ---- a/gfx/2d/ConvolutionFilter.cpp -+++ b/gfx/2d/ConvolutionFilter.cpp -@@ -29,32 +29,79 @@ bool ConvolutionFilter::GetFilterOffsetA - int32_t* aResultLength) { - if (aRowIndex >= mFilter->numValues()) { - return false; - } - mFilter->FilterForValue(aRowIndex, aResultOffset, aResultLength); - return true; - } - -+static void ByteSwapArray(uint8_t *u8Array, int32_t size) { -+ uint32_t *array = reinterpret_cast(u8Array); -+ for (int pxl = 0; pxl < size; ++pxl) { -+ // Use an endian swap to move the bytes, i.e. BGRA -> ARGB. -+ uint32_t rgba = array[pxl]; -+ array[pxl] = NativeEndian::swapToLittleEndian(rgba); -+ } -+} -+ - void ConvolutionFilter::ConvolveHorizontally(const uint8_t* aSrc, uint8_t* aDst, - bool aHasAlpha) { -+#if MOZ_BIG_ENDIAN() -+ int outputSize = mFilter->numValues(); -+ -+ // Input size isn't handed in, so we have to calculate it quickly -+ int inputSize = 0; -+ for (int xx = 0; xx < outputSize; ++xx) { -+ // Get the filter that determines the current output pixel. -+ int filterOffset, filterLength; -+ mFilter->FilterForValue(xx, &filterOffset, &filterLength); -+ inputSize = std::max(inputSize, filterOffset + filterLength); -+ } -+ -+ ByteSwapArray((uint8_t*)aSrc, inputSize); -+#endif -+ - SkOpts::convolve_horizontally(aSrc, *mFilter, aDst, aHasAlpha); -+ -+#if MOZ_BIG_ENDIAN() -+ ByteSwapArray((uint8_t*)aSrc, inputSize); -+ ByteSwapArray(aDst, outputSize); -+#endif - } - - void ConvolutionFilter::ConvolveVertically(uint8_t* const* aSrc, uint8_t* aDst, - int32_t aRowIndex, int32_t aRowSize, - bool aHasAlpha) { - MOZ_ASSERT(aRowIndex < mFilter->numValues()); - - int32_t filterOffset; - int32_t filterLength; - auto filterValues = - mFilter->FilterForValue(aRowIndex, &filterOffset, &filterLength); -+ -+#if MOZ_BIG_ENDIAN() -+ for (int filterY = 0; filterY < filterLength; filterY++) { -+ // Skia only knows LE, so we have to swizzle the input -+ ByteSwapArray(aSrc[filterY], aRowSize); -+ } -+#endif -+ - SkOpts::convolve_vertically(filterValues, filterLength, aSrc, aRowSize, aDst, - aHasAlpha); -+ -+#if MOZ_BIG_ENDIAN() -+ // After skia is finished, we swizzle back to BE, in case -+ // the input is used again somewhere else -+ for (int filterY = 0; filterY < filterLength; filterY++) { -+ ByteSwapArray(aSrc[filterY], aRowSize); -+ } -+ // The destination array as well -+ ByteSwapArray(aDst, aRowSize); -+#endif - } - - /* ConvolutionFilter::ComputeResizeFactor is derived from Skia's - * SkBitmapScaler/SkResizeFilter::computeFactors. It is governed by Skia's - * BSD-style license (see gfx/skia/LICENSE) and the following copyright: - * Copyright (c) 2015 Google Inc. - */ - bool ConvolutionFilter::ComputeResizeFilter(ResizeMethod aResizeMethod, -diff --git a/gfx/skia/skia/include/core/SkPreConfig.h b/gfx/skia/skia/include/core/SkPreConfig.h ---- a/gfx/skia/skia/include/core/SkPreConfig.h -+++ b/gfx/skia/skia/include/core/SkPreConfig.h -@@ -68,17 +68,17 @@ - #define SK_CPU_BENDIAN - #elif defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - #define SK_CPU_LENDIAN - #elif defined(__sparc) || defined(__sparc__) || \ - defined(_POWER) || defined(__powerpc__) || \ - defined(__ppc__) || defined(__hppa) || \ - defined(__PPC__) || defined(__PPC64__) || \ - defined(_MIPSEB) || defined(__ARMEB__) || \ -- defined(__s390__) || \ -+ defined(__s390__) || defined(__s390x__) || \ - (defined(__sh__) && defined(__BIG_ENDIAN__)) || \ - (defined(__ia64) && defined(__BIG_ENDIAN__)) - #define SK_CPU_BENDIAN - #else - #define SK_CPU_LENDIAN - #endif - #endif - diff --git a/mozilla-bmo1504834-part4.patch b/mozilla-bmo1504834-part4.patch deleted file mode 100644 index 9fb32f1..0000000 --- a/mozilla-bmo1504834-part4.patch +++ /dev/null @@ -1,40 +0,0 @@ -# HG changeset patch -# Parent 883d2c7fec80b9714ccfefa461a02f5b09e3ee09 -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 --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp ---- a/gfx/2d/DrawTargetSkia.cpp -+++ b/gfx/2d/DrawTargetSkia.cpp -@@ -1856,16 +1856,24 @@ void DrawTargetSkia::PushLayerWithBlend( - } - - SkCanvas::SaveLayerRec saveRec( - aBounds.IsEmpty() ? nullptr : &bounds, &paint, nullptr, clipImage.get(), - &clipMatrix, - 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); - - #ifdef MOZ_WIDGET_COCOA - CGContextRelease(mCG); - mCG = nullptr; - #endif diff --git a/mozilla-bmo1602730.patch b/mozilla-bmo1602730.patch deleted file mode 100644 index 810047f..0000000 --- a/mozilla-bmo1602730.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User msirringhaus@suse.de -# Date 1582805890 -3600 -# Thu Feb 27 13:18:10 2020 +0100 -# Node ID 457cbe5705f2a3759d3da36a05c0ed66ec61ea12 -# Parent 7440f4b6bab85068ca2f84e9c48e0706d04330e8 -imported patch mozilla-bmo1602730-FF73.patch - -diff -r 7440f4b6bab8 gfx/layers/composite/CompositableHost.cpp ---- a/gfx/layers/composite/CompositableHost.cpp Thu Feb 27 13:17:56 2020 +0100 -+++ b/gfx/layers/composite/CompositableHost.cpp Wed Jun 17 15:33:32 2020 +0200 -@@ -92,9 +92,13 @@ - } - MOZ_ASSERT(source); - -+ // Setting an alpha-mask here breaks the URL-bar on big endian (s390x) -+ // if the typed URL is too long for the textbox (automatic scrolling needed) -+#if MOZ_LITTLE_ENDIAN() - RefPtr effect = - new EffectMask(source, source->GetSize(), aTransform); - aEffects.mSecondaryEffects[EffectTypes::MASK] = effect; -+#endif - return true; - } - diff --git a/mozilla-bmo1626236.patch b/mozilla-bmo1626236.patch deleted file mode 100644 index 9615c04..0000000 --- a/mozilla-bmo1626236.patch +++ /dev/null @@ -1,85 +0,0 @@ -# HG changeset patch -# User msirringhaus@suse.de -# Date 1582805876 -3600 -# Thu Feb 27 13:17:56 2020 +0100 -# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158 -# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f -imported patch decoder_workaround.patch - -diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp ---- a/image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ b/image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -422,6 +422,9 @@ - MOZ_ASSERT(mSwizzleFn); - uint8_t* data = reinterpret_cast(aColormap); - mSwizzleFn(data, data, aColors); -+#if MOZ_BIG_ENDIAN() -+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors); -+#endif - } - - LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator, -diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp ---- a/image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ b/image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -263,6 +263,9 @@ - case JCS_YCbCr: - // By default, we will output directly to BGRA. If we need to apply - // special color transforms, this may change. -+#if MOZ_BIG_ENDIAN() -+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB; -+#else - switch (SurfaceFormat::OS_RGBX) { - case SurfaceFormat::B8G8R8X8: - mInfo.out_color_space = JCS_EXT_BGRX; -@@ -277,6 +280,7 @@ - mState = JPEG_ERROR; - return Transition::TerminateFailure(); - } -+#endif - break; - case JCS_CMYK: - case JCS_YCCK: -diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp ---- a/image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ b/image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -361,7 +361,7 @@ - IResumable* aOnResume) { - MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!"); - -- return mLexer.Lex(aIterator, aOnResume, -+ LexerResult res = mLexer.Lex(aIterator, aOnResume, - [=](State aState, const char* aData, size_t aLength) { - switch (aState) { - case State::PNG_DATA: -@@ -371,6 +371,14 @@ - } - MOZ_CRASH("Unknown State"); - }); -+ -+#if MOZ_BIG_ENDIAN() -+ if(res.is() && res.as() == TerminalState::SUCCESS) { -+ NativeEndian::swapToLittleEndianInPlace((uint32_t*)(mImageData), mImageDataLength / 4); -+ } -+#endif -+ -+ return res; - } - - LexerTransition nsPNGDecoder::ReadPNGData( -diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp ---- a/image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100 -+++ b/image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100 -@@ -237,7 +237,12 @@ - // WebP doesn't guarantee that the alpha generated matches the hint in the - // header, so we always need to claim the input is BGRA. If the output is - // BGRX, swizzling will mask off the alpha channel. -+#if MOZ_BIG_ENDIAN() -+ mBuffer.colorspace = MODE_ARGB; -+ SurfaceFormat inFormat = mFormat; -+#else - SurfaceFormat inFormat = SurfaceFormat::OS_RGBA; -+#endif - - SurfacePipeFlags pipeFlags = SurfacePipeFlags(); - if (mFormat == SurfaceFormat::OS_RGBA && diff --git a/mozilla-bmo1724679.patch b/mozilla-bmo1724679.patch deleted file mode 100644 index d2b523a..0000000 --- a/mozilla-bmo1724679.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp ---- a/toolkit/components/remote/nsRemoteService.cpp -+++ b/toolkit/components/remote/nsRemoteService.cpp -@@ -107,7 +107,8 @@ - bool useX11Remote = mozilla::widget::GdkIsX11Display(); - - # if defined(MOZ_ENABLE_DBUS) -- if (!useX11Remote || getenv(DBUS_REMOTE_ENV)) { -+ const char* dbusRemoteEnv = getenv(DBUS_REMOTE_ENV); -+ if (!useX11Remote || (dbusRemoteEnv && *dbusRemoteEnv == '1')) { - client = MakeUnique(); - } - # endif -diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp ---- a/toolkit/xre/nsAppRunner.cpp -+++ b/toolkit/xre/nsAppRunner.cpp -@@ -4125,7 +4125,7 @@ - const char* x11Display = PR_GetEnv("DISPLAY"); - // MOZ_ENABLE_WAYLAND is our primary Wayland on/off switch. - const char* waylandPref = PR_GetEnv("MOZ_ENABLE_WAYLAND"); -- bool enableWayland = !x11Display || (waylandPref && *waylandPref); -+ bool enableWayland = !x11Display || (waylandPref && *waylandPref == '1'); - if (!enableWayland) { - const char* backendPref = PR_GetEnv("GDK_BACKEND"); - enableWayland = (backendPref && strncmp(backendPref, "wayland", 7) == 0); -diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp ---- a/widget/gtk/nsFilePicker.cpp -+++ b/widget/gtk/nsFilePicker.cpp -@@ -616,7 +616,7 @@ - if (mUseNativeFileChooser && sGtkNativeDialogShowPtr != nullptr) { - const char* portalEnvString = g_getenv("GTK_USE_PORTAL"); - bool setPortalEnv = -- (portalEnvString && atoi(portalEnvString) == 0) || !portalEnvString; -+ (portalEnvString && *portalEnvString == '0') || !portalEnvString; - if (setPortalEnv) { - setenv("GTK_USE_PORTAL", "1", true); - } -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -8835,7 +8835,7 @@ - // decorations does not work with CSD. - // We check GTK_CSD as well as gtk_window_should_use_csd() does. - const char* csdOverride = getenv("GTK_CSD"); -- if (csdOverride && atoi(csdOverride)) { -+ if (csdOverride && *csdOverride == '1') { - sGtkWindowDecoration = GTK_DECORATION_CLIENT; - return sGtkWindowDecoration; - } - - diff --git a/mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch b/mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch deleted file mode 100644 index 48ec934..0000000 --- a/mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# Parent 9bc02ee6567ae3f1dad1f8578e650c0a1faa0179 - -diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp ---- a/js/src/wasm/WasmSignalHandlers.cpp -+++ b/js/src/wasm/WasmSignalHandlers.cpp -@@ -240,17 +240,17 @@ using mozilla::DebugOnly; - // Those definitions are however not present in the headers of every Linux - // distro - Raspbian is known to be a problem, for example. However those - // distros are tier-3 platforms. - // - // If you run into compile problems on a tier-3 platform, you can disable the - // emulation here. - - #if defined(__linux__) && defined(__arm__) --# define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS -+// # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS - #endif - - #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS - # include - #endif - - #if defined(ANDROID) - // Not all versions of the Android NDK define ucontext_t or mcontext_t. diff --git a/mozilla-fix-top-level-asm.patch b/mozilla-fix-top-level-asm.patch index b2d71c3..72f2c20 100644 --- a/mozilla-fix-top-level-asm.patch +++ b/mozilla-fix-top-level-asm.patch @@ -49,7 +49,7 @@ diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build ] if CONFIG["CC_TYPE"] in ("clang", "gcc"): - CXXFLAGS += ["-Wno-shadow", "-Wno-error=stack-protector"] + CXXFLAGS += ["-Wno-error=stack-protector"] SOURCES["../chromium/sandbox/linux/services/syscall_wrappers.cc"].flags += [ "-Wno-empty-body", ] diff --git a/mozilla-kde.patch b/mozilla-kde.patch index 9c0c1ee..4494bc0 100644 --- a/mozilla-kde.patch +++ b/mozilla-kde.patch @@ -3,7 +3,7 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent c8bc6be5267f16016d506973a2d6a7c58a1cd441 +# Parent 64d0c9c59c2e7f31722466406a4c13cdf5c39a6b Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -13,12 +13,12 @@ Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp -@@ -84,16 +84,17 @@ - #include "plbase64.h" +@@ -88,16 +88,17 @@ #include "PLDHashTable.h" #include "plstr.h" #include "prlink.h" #include "xpcpublic.h" + #include "js/RootingAPI.h" #ifdef MOZ_BACKGROUNDTASKS # include "mozilla/BackgroundTasks.h" #endif @@ -31,22 +31,12 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp #ifdef MOZ_MEMORY # include "mozmemory.h" #endif -@@ -4635,25 +4636,37 @@ nsresult Preferences::InitInitialObjects - // application pref files for backwards compatibility. - static const char* specialFiles[] = { - #if defined(XP_MACOSX) - "macprefs.js" - #elif defined(XP_WIN) - "winpref.js" - #elif defined(XP_UNIX) +@@ -4767,16 +4768,27 @@ nsresult Preferences::InitInitialObjects "unix.js" -+ , "" // placeholder for KDE (empty is otherwise harmless) # if defined(_AIX) , "aix.js" # endif - #elif defined(XP_BEOS) - "beos.js" #endif }; @@ -69,7 +59,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp // Load jar:$app/omni.jar!/defaults/preferences/*.js // or jar:$gre/omni.jar!/defaults/preferences/*.js. -@@ -4718,17 +4731,17 @@ nsresult Preferences::InitInitialObjects +@@ -4841,17 +4853,17 @@ nsresult Preferences::InitInitialObjects } nsCOMPtr path = do_QueryInterface(elem); @@ -91,7 +81,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build -@@ -117,16 +117,20 @@ EXPORTS.mozilla += [ +@@ -120,16 +120,20 @@ EXPORTS.mozilla += [ ] EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) @@ -157,7 +147,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build --- a/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build -@@ -45,10 +45,14 @@ XPCOM_MANIFESTS += [ +@@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [ if CONFIG["MOZ_PLACES"]: EXTRA_JS_MODULES += [ @@ -175,7 +165,7 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm -@@ -1231,36 +1231,66 @@ nsUnknownContentTypeDialog.prototype = { +@@ -1254,36 +1254,66 @@ nsUnknownContentTypeDialog.prototype = { params.handlerApp && params.handlerApp.executable && params.handlerApp.executable.isFile() @@ -265,15 +255,16 @@ diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downlo diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -@@ -13,16 +13,17 @@ - #include "nsPrintfCString.h" - #include "nsNetCID.h" +@@ -10,16 +10,18 @@ + #include "prnetdb.h" + #include "prenv.h" + #include "nsInterfaceHashtable.h" + #include "nsHashtablesFwd.h" + #include "nsHashKeys.h" #include "nsNetUtil.h" #include "nsISupportsPrimitives.h" #include "nsIGSettingsService.h" - #include "nsInterfaceHashtable.h" - #include "mozilla/Attributes.h" - #include "nsIURI.h" ++#include "nsPrintfCString.h" +#include "nsKDEUtils.h" using namespace mozilla; @@ -283,7 +274,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy NS_DECL_ISUPPORTS NS_DECL_NSISYSTEMPROXYSETTINGS -@@ -36,16 +37,18 @@ class nsUnixSystemProxySettings final : +@@ -33,16 +35,18 @@ class nsUnixSystemProxySettings final : nsCOMPtr mProxySettings; nsInterfaceHashtable mSchemeProxySettings; @@ -302,7 +293,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { // dbus prevents us from being threadsafe, but this routine should not block // anyhow -@@ -381,21 +384,50 @@ nsresult nsUnixSystemProxySettings::GetP +@@ -378,21 +382,50 @@ nsresult nsUnixSystemProxySettings::GetP return NS_OK; } @@ -356,7 +347,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build -@@ -93,17 +93,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co +@@ -92,17 +92,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co "../components/printingui", ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": @@ -370,17 +361,17 @@ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build + "nsKDEUtils.cpp", "nsNativeAppSupportUnix.cpp", ] + CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] else: UNIFIED_SOURCES += [ "nsNativeAppSupportDefault.cpp", ] - if CONFIG["MOZ_HAS_REMOTE"]: diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp new file mode 100644 --- /dev/null +++ b/toolkit/xre/nsKDEUtils.cpp -@@ -0,0 +1,344 @@ +@@ -0,0 +1,321 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -420,36 +411,13 @@ new file mode 100644 +#define MAKE_STR( n ) MAKE_STR2( n ) + +static bool getKdeSession() ++{ ++ if (PR_GetEnv("KDE_FULL_SESSION")) + { -+ Display* dpy = XOpenDisplay( NULL ); -+ if( dpy == NULL ) -+ return false; -+ Atom kde_full_session = XInternAtom( dpy, "KDE_FULL_SESSION", true ); -+ bool kde = false; -+ if( kde_full_session != None ) -+ { -+ int cnt; -+ if( Atom* props = XListProperties( dpy, DefaultRootWindow( dpy ), &cnt )) -+ { -+ for( int i = 0; -+ i < cnt; -+ ++i ) -+ { -+ if( props[ i ] == kde_full_session ) -+ { -+ kde = true; -+#ifdef DEBUG_KDE -+ fprintf( stderr, "KDE SESSION %d\n", kde ); -+#endif -+ break; -+ } -+ } -+ XFree( props ); -+ } -+ } -+ XCloseDisplay( dpy ); -+ return kde; ++ return true; + } ++ return false; ++} + +static bool getKdeSupport() + { @@ -819,34 +787,15 @@ diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandle /* * Check if a handler exists for the provided protocol. Check the datastore -@@ -328,17 +328,17 @@ mozilla::ipc::IPCResult HandlerServicePa - nsCOMPtr protoSvc = - do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &rv); - if (NS_WARN_IF(NS_FAILED(rv))) { - *aHandlerExists = false; - return IPC_OK(); - } - rv = protoSvc->ExternalProtocolHandlerExists(aProtocolScheme.get(), - aHandlerExists); -- -+## - if (NS_WARN_IF(NS_FAILED(rv))) { - *aHandlerExists = false; - } - #else - MOZ_RELEASE_ASSERT(false, "No implementation on this platform."); - *aHandlerExists = false; - #endif - return IPC_OK(); diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build -@@ -80,17 +80,19 @@ else: +@@ -78,17 +78,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui + else: + # These files can't be built in unified mode because they redefine LOG. SOURCES += [ osdir + "/nsOSHelperAppService.cpp", ] - if CONFIG["CC_TYPE"] in ("clang", "gcc"): - CXXFLAGS += ["-Wno-error=shadow"] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": UNIFIED_SOURCES += [ @@ -861,7 +810,7 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": UNIFIED_SOURCES += [ -@@ -128,16 +130,17 @@ include("/ipc/chromium/chromium-config.m +@@ -130,16 +132,17 @@ include("/ipc/chromium/chromium-config.m FINAL_LIBRARY = "xul" LOCAL_INCLUDES += [ @@ -874,11 +823,11 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build ] if CONFIG["MOZ_ENABLE_DBUS"]: - CXXFLAGS += CONFIG["TK_CFLAGS"] CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - CXXFLAGS += CONFIG["TK_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp new file mode 100644 --- /dev/null @@ -974,12 +923,13 @@ diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/ new file mode 100644 --- /dev/null +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp -@@ -0,0 +1,86 @@ +@@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + ++#include "mozilla/StaticPrefs_browser.h" +#include "nsKDERegistry.h" +#include "prlink.h" +#include "prmem.h" @@ -1055,8 +1005,10 @@ new file mode 100644 + nsCString description = output[ 1 ]; + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); + nsCString handlerAppName = output[ 2 ]; ++ mozilla::StaticPrefs::browser_download_improvements_to_download_panel() ++ ? mimeInfo->SetPreferredAction(nsIMIMEInfo::saveToDisk) ++ : mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); -+ mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); + return mimeInfo.forget(); + } + return nullptr; @@ -1214,7 +1166,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth #include "nsISupports.h" #include "nsString.h" #include "nsReadableUtils.h" -@@ -1024,17 +1024,17 @@ nsresult nsOSHelperAppService::GetHandle +@@ -1025,17 +1025,17 @@ nsresult nsOSHelperAppService::GetHandle nsresult nsOSHelperAppService::OSProtocolHandlerExists( const char* aProtocolScheme, bool* aHandlerExists) { @@ -1233,7 +1185,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth nsCOMPtr handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv) && handlerSvc) { -@@ -1044,17 +1044,17 @@ nsresult nsOSHelperAppService::OSProtoco +@@ -1045,17 +1045,17 @@ nsresult nsOSHelperAppService::OSProtoco } return rv; @@ -1252,7 +1204,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( const nsACString& aScheme, bool* _retval) { -@@ -1147,17 +1147,17 @@ already_AddRefed nsOSHel +@@ -1148,17 +1148,17 @@ already_AddRefed nsOSHel nsresult rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, minorType, mime_types_description, true); @@ -1271,7 +1223,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, minorType, mime_types_description, false); -@@ -1258,17 +1258,17 @@ already_AddRefed nsOSHel +@@ -1261,17 +1261,17 @@ already_AddRefed nsOSHel // Now look up our extensions nsAutoString extensions, mime_types_description; @@ -1293,7 +1245,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -136,16 +136,17 @@ FINAL_LIBRARY = "xul" +@@ -154,16 +154,17 @@ FINAL_LIBRARY = "xul" LOCAL_INCLUDES += [ "/layout/base", @@ -1307,7 +1259,7 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build "/widget/headless", ] - if CONFIG["MOZ_X11"]: + if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]: LOCAL_INCLUDES += [ "/widget/x11", ] @@ -1350,7 +1302,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp # include "Units.h" extern mozilla::LazyLogModule gWidgetLog; # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) -@@ -242,17 +245,19 @@ nsFilePicker::AppendFilters(int32_t aFil +@@ -236,17 +239,19 @@ nsFilePicker::AppendFilters(int32_t aFil mAllowURLs = !!(aFilterMask & filterAllowURLs); return nsBaseFilePicker::AppendFilters(aFilterMask); } @@ -1371,7 +1323,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp mFilters.AppendElement(filter); mFilterNames.AppendElement(name); -@@ -352,16 +357,39 @@ nsresult nsFilePicker::Show(int16_t* aRe +@@ -346,16 +351,39 @@ nsresult nsFilePicker::Show(int16_t* aRe return NS_OK; } @@ -1411,7 +1363,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp GtkFileChooserAction action = GetGtkFileChooserAction(mMode); const gchar* accept_button; -@@ -581,16 +609,244 @@ void nsFilePicker::Done(void* file_choos +@@ -575,16 +603,244 @@ void nsFilePicker::Done(void* file_choos mCallback->Done(result); mCallback = nullptr; } else { @@ -1829,7 +1781,7 @@ diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build ] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": - CXXFLAGS += CONFIG["TK_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] if CONFIG["MOZ_ENABLE_DBUS"]: CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] @@ -1837,7 +1789,7 @@ diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp -@@ -53,16 +53,17 @@ +@@ -54,16 +54,17 @@ #include "prproces.h" #include "nsIDirectoryEnumerator.h" #include "nsSimpleEnumerator.h" @@ -1855,7 +1807,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp # include "prmem.h" # include "plbase64.h" -@@ -2021,62 +2022,77 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -2097,20 +2098,29 @@ nsLocalFile::SetPersistentDescriptor(con NS_IMETHODIMP nsLocalFile::Reveal() { @@ -1864,47 +1816,10 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp } #ifdef MOZ_WIDGET_GTK -- nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); -- if (!giovfs) { -- return NS_ERROR_FAILURE; -- } + nsAutoCString url; - - bool isDirectory; - if (NS_FAILED(IsDirectory(&isDirectory))) { - return NS_ERROR_FAILURE; - } - -+ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - if (isDirectory) { -- return giovfs->ShowURIForInput(mPath); -+ url = mPath; - } - if (NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { - return NS_OK; - } - nsCOMPtr parentDir; - nsAutoCString dirPath; - if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) { - return NS_ERROR_FAILURE; - } - if (NS_FAILED(parentDir->GetNativePath(dirPath))) { - return NS_ERROR_FAILURE; - } - -- return giovfs->ShowURIForInput(dirPath); -+ url = dirPath; - #elif defined(MOZ_WIDGET_COCOA) - CFURLRef url; - if (NS_SUCCEEDED(GetCFURL(&url))) { - nsresult rv = CocoaFileUtils::RevealFileInFinder(url); - ::CFRelease(url); - return rv; - } - return NS_ERROR_FAILURE; - #else - return NS_ERROR_FAILURE; - #endif + nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); +- if (!giovfs) { ++ url = mPath; + if(nsKDEUtils::kdeSupport()) { + nsTArray command; + command.AppendElement( "REVEAL"_ns ); @@ -1913,10 +1828,18 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp + } + + if (!giovfs) -+ return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE; +- } + -+ return giovfs->ShowURIForInput(url); - } + return giovfs->RevealFile(this); + #elif defined(MOZ_WIDGET_COCOA) + CFURLRef url; + if (NS_SUCCEEDED(GetCFURL(&url))) { + nsresult rv = CocoaFileUtils::RevealFileInFinder(url); + ::CFRelease(url); + return rv; + } +@@ -2122,16 +2132,23 @@ nsLocalFile::Reveal() { NS_IMETHODIMP nsLocalFile::Launch() { @@ -1931,11 +1854,12 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp + command.AppendElement( mPath ); + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + } ++ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); if (!giovfs) { return NS_ERROR_FAILURE; } - return giovfs->ShowURIForInput(mPath); + return giovfs->LaunchFile(mPath); #elif defined(MOZ_WIDGET_ANDROID) // Not supported on GeckoView diff --git a/mozilla-libavcodec58_91.patch b/mozilla-libavcodec58_91.patch index 8d409a4..6901af2 100644 --- a/mozilla-libavcodec58_91.patch +++ b/mozilla-libavcodec58_91.patch @@ -1,27 +1,18 @@ # HG changeset patch -# Parent e4abeadbbb7a0c63c17177f1d14ea04c77c6128e +# Parent 63747fd31719c6e4f7810512a3c57e75a02b8bfd diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp --- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp +++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp -@@ -22,23 +22,27 @@ class FFmpegDecoderModule { - static already_AddRefed Create(FFmpegLibWrapper*); - }; - - static FFmpegLibWrapper sLibAV; - - static const char* sLibs[] = { - // clang-format off - #if defined(XP_DARWIN) -+ "libavcodec.58.134.dylib", -+ "libavcodec.58.91.dylib", - "libavcodec.58.dylib", - "libavcodec.57.dylib", - "libavcodec.56.dylib", +@@ -34,16 +34,18 @@ static const char* sLibs[] = { "libavcodec.55.dylib", "libavcodec.54.dylib", "libavcodec.53.dylib", + #elif defined(XP_OPENBSD) + "libavcodec.so", // OpenBSD hardly controls the major/minor library version + // of ffmpeg and update it regulary on ABI/API changes #else + "libavcodec.so.59", + "libavcodec.so.58.134", + "libavcodec.so.58.91", "libavcodec.so.58", diff --git a/mozilla-pgo.patch b/mozilla-pgo.patch new file mode 100644 index 0000000..ce62399 --- /dev/null +++ b/mozilla-pgo.patch @@ -0,0 +1,190 @@ +# HG changeset patch +# User Wolfgang Rosenauer +# Parent 02ffee15578fd4dc2dd5ade32e7dab907d633b0d + +diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure +--- a/build/moz.configure/lto-pgo.configure ++++ b/build/moz.configure/lto-pgo.configure +@@ -242,34 +242,34 @@ def lto( + "configure." + ) + + if c_compiler.type == "clang": + if value == "full": + cflags.append("-flto") + ldflags.append("-flto") + else: +- cflags.append("-flto=thin") +- ldflags.append("-flto=thin") ++ cflags.append("-flto") ++ ldflags.append("-flto") + + if target.os == "Android" and value == "cross": + # Work around https://github.com/rust-lang/rust/issues/90088 + # by enabling the highest level of SSE the rust targets default + # to. + # https://github.com/rust-lang/rust/blob/bdfcb88e8b6203ccb46a2fb6649979b773efc8ac/compiler/rustc_target/src/spec/i686_linux_android.rs#L13 + # https://github.com/rust-lang/rust/blob/8d1083e319841624f64400e1524805a40d725439/compiler/rustc_target/src/spec/x86_64_linux_android.rs#L7 + if target.cpu == "x86": + ldflags.append("-Wl,-plugin-opt=-mattr=+ssse3") + elif target.cpu == "x86_64": + ldflags.append("-Wl,-plugin-opt=-mattr=+sse4.2") + elif c_compiler.type == "clang-cl": + if value == "full": + cflags.append("-flto") + else: +- cflags.append("-flto=thin") ++ cflags.append("-flto") + # With clang-cl, -flto can only be used with -c or -fuse-ld=lld. + # AC_TRY_LINKs during configure don't have -c, so pass -fuse-ld=lld. + cflags.append("-fuse-ld=lld") + + # Explicitly set the CPU to optimize for so the linker doesn't + # choose a poor default. Rust compilation by default uses the + # pentium4 CPU on x86: + # +diff --git a/build/pgo/profileserver.py b/build/pgo/profileserver.py +--- a/build/pgo/profileserver.py ++++ b/build/pgo/profileserver.py +@@ -6,17 +6,17 @@ + + import json + import os + import sys + import glob + import subprocess + + import mozcrash +-from mozbuild.base import MozbuildObject, BinaryNotFoundException ++from mozbuild.base import MozbuildObject, BinaryNotFoundException, BuildEnvironmentNotFoundException + from mozfile import TemporaryDirectory + from mozhttpd import MozHttpd + from mozprofile import FirefoxProfile, Preferences + from mozprofile.permissions import ServerLocations + from mozrunner import FirefoxRunner, CLI + from six import string_types + + PORT = 8888 +@@ -82,19 +82,32 @@ if __name__ == "__main__": + docroot=os.path.join(build.topsrcdir, "build", "pgo"), + path_mappings=path_mappings, + ) + httpd.start(block=False) + + locations = ServerLocations() + locations.add_host(host="127.0.0.1", port=PORT, options="primary,privileged") + +- old_profraw_files = glob.glob("*.profraw") +- for f in old_profraw_files: +- os.remove(f) ++ using_gcc = False ++ try: ++ if build.config_environment.substs.get('CC_TYPE') == 'gcc': ++ using_gcc = True ++ except BuildEnvironmentNotFoundException: ++ pass ++ ++ if using_gcc: ++ for dirpath, _, filenames in os.walk('.'): ++ for f in filenames: ++ if f.endswith('.gcda'): ++ os.remove(os.path.join(dirpath, f)) ++ else: ++ old_profraw_files = glob.glob('*.profraw') ++ for f in old_profraw_files: ++ os.remove(f) + + with TemporaryDirectory() as profilePath: + # TODO: refactor this into mozprofile + profile_data_dir = os.path.join(build.topsrcdir, "testing", "profiles") + with open(os.path.join(profile_data_dir, "profiles.json"), "r") as fh: + base_profiles = json.load(fh)["profileserver"] + + prefpaths = [ +@@ -207,16 +220,20 @@ if __name__ == "__main__": + + # Try to move the crash reports to the artifacts even if Firefox appears + # to exit successfully, in case there's a crash that doesn't set the + # return code to non-zero for some reason. + if get_crashreports(profilePath, name="Firefox exited successfully?") != 0: + print("Firefox exited successfully, but produced a crashreport") + sys.exit(1) + ++ print('Copying profile data....') ++ os.system('pwd'); ++ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd ..; tar xf instrumented/profdata.tar.gz;'); ++ + llvm_profdata = env.get("LLVM_PROFDATA") + if llvm_profdata: + profraw_files = glob.glob("*.profraw") + if not profraw_files: + print( + "Could not find profraw files in the current directory: %s" + % os.getcwd() + ) +diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix +--- a/build/unix/mozconfig.unix ++++ b/build/unix/mozconfig.unix +@@ -1,14 +1,23 @@ + . "$topsrcdir/build/mozconfig.common" + + if [ -n "$FORCE_GCC" ]; then + CC="$MOZ_FETCHES_DIR/gcc/bin/gcc" + CXX="$MOZ_FETCHES_DIR/gcc/bin/g++" + ++ if [ -n "$MOZ_PGO" ]; then ++ if [ -z "$USE_ARTIFACT" ]; then ++ ac_add_options --enable-lto ++ fi ++ export AR="$topsrcdir/gcc/bin/gcc-ar" ++ export NM="$topsrcdir/gcc/bin/gcc-nm" ++ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib" ++ fi ++ + # We want to make sure we use binutils and other binaries in the tooltool + # package. + mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH" + else + # For some builds we don't want to have Clang based static-analysis activated + if [ -z "$DISABLE_CLANG_PLUGIN" ]; then + export ENABLE_CLANG_PLUGIN=1 + fi +diff --git a/extensions/spellcheck/src/moz.build b/extensions/spellcheck/src/moz.build +--- a/extensions/spellcheck/src/moz.build ++++ b/extensions/spellcheck/src/moz.build +@@ -23,8 +23,10 @@ LOCAL_INCLUDES += [ + "../hunspell/glue", + "../hunspell/src", + "/dom/base", + ] + EXPORTS.mozilla += [ + "mozInlineSpellChecker.h", + "mozSpellChecker.h", + ] ++ ++CXXFLAGS += ['-fno-devirtualize'] +diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp +--- a/toolkit/components/terminator/nsTerminator.cpp ++++ b/toolkit/components/terminator/nsTerminator.cpp +@@ -461,16 +461,21 @@ void nsTerminator::StartWatchdog() { + // Defend against overflow + crashAfterMS = INT32_MAX; + } else { + crashAfterMS *= scaleUp; + } + } + #endif + ++ // Disable watchdog for PGO train builds - writting profile information at ++ // exit may take time and it is better to make build hang rather than ++ // silently produce poorly performing binary. ++ crashAfterMS = INT32_MAX; ++ + UniquePtr options(new Options()); + // crashAfterTicks is guaranteed to be > 0 as + // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS + options->crashAfterTicks = crashAfterMS / HEARTBEAT_INTERVAL_MS; + + DebugOnly watchdogThread = + CreateSystemThread(RunWatchdog, options.release()); + MOZ_ASSERT(watchdogThread); diff --git a/mozilla-reduce-rust-debuginfo.patch b/mozilla-reduce-rust-debuginfo.patch index 7695b85..620f178 100644 --- a/mozilla-reduce-rust-debuginfo.patch +++ b/mozilla-reduce-rust-debuginfo.patch @@ -1,28 +1,11 @@ -diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure ---- a/build/moz.configure/rust.configure -+++ b/build/moz.configure/rust.configure -@@ -610,6 +610,7 @@ set_config("CARGO_PROFILE_DEV_OPT_LEVEL" - "--enable-frame-pointers", - path_remapping, - path_remappings, -+ host - ) - def rust_compile_flags( - opt_level, -@@ -619,6 +620,7 @@ def rust_compile_flags( - frame_pointers, - path_remapping, - path_remappings, -+ host - ): - # Cargo currently supports only two interesting profiles for building: - # development and release. Those map (roughly) to --enable-debug and -@@ -642,6 +644,8 @@ def rust_compile_flags( +--- firefox-96.0.3.orig/build/moz.configure/rust.configure ++++ firefox-96.0.3/build/moz.configure/rust.configure +@@ -641,7 +643,7 @@ def rust_compile_flags( + debug_assertions = False if debug_symbols: - debug_info = "2" -+ if host.bitness == 32 or host.cpu == 'aarch64' or host.cpu == 'ppc64' or host.cpu == 's390x': -+ debug_info = '1' +- debug_info = "2" ++ debug_info = '1' opts = [] diff --git a/mozilla-s390-context.patch b/mozilla-s390-context.patch index 1a38737..070200a 100644 --- a/mozilla-s390-context.patch +++ b/mozilla-s390-context.patch @@ -3,54 +3,51 @@ # Date 1558452408 -7200 # Tue May 21 17:26:48 2019 +0200 # Node ID 602e92722e765a3c238d3b96b26c0c8063b5eeb4 -# Parent cb0089687ab899846b8229c3741261d50101340e +# Parent 136e1f2c44a3099b3e49a576fa62c8ad77aa431e [mq]: mozilla-s390-context.patch diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp --- a/js/src/wasm/WasmSignalHandlers.cpp +++ b/js/src/wasm/WasmSignalHandlers.cpp -@@ -150,16 +150,20 @@ using mozilla::DebugOnly; - # define FP_sig(p) ((p)->uc_mcontext.mc_fp) - # define SP_sig(p) ((p)->uc_mcontext.mc_i7) - # endif - # if defined(__linux__) && (defined(__ppc64__) || defined(__PPC64__) || \ - defined(__ppc64le__) || defined(__PPC64LE__)) - # define R01_sig(p) ((p)->uc_mcontext.gp_regs[1]) - # define R32_sig(p) ((p)->uc_mcontext.gp_regs[32]) - # endif +@@ -157,16 +157,20 @@ using mozilla::DebugOnly; + # define R32_sig(p) ((p)->uc_mcontext.gp_regs[32]) + # endif + # if defined(__linux__) && defined(__loongarch__) + # define EPC_sig(p) ((p)->uc_mcontext.pc) + # define RRA_sig(p) ((p)->uc_mcontext.gregs[1]) + # define RSP_sig(p) ((p)->uc_mcontext.gregs[3]) + # define RFP_sig(p) ((p)->uc_mcontext.gregs[22]) + # endif +# if defined(__linux__) && defined(__s390x__) +# define GR_sig(p,x) ((p)->uc_mcontext.gregs[x]) +# define PSWa_sig(p) ((p)->uc_mcontext.psw.addr) +# endif - #elif defined(__NetBSD__) - # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP]) - # define EBP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EBP]) - # define ESP_sig(p) ((p)->uc_mcontext.__gregs[_REG_ESP]) - # define RIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RIP]) - # define RSP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RSP]) - # define RBP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RBP]) - # define R11_sig(p) ((p)->uc_mcontext.__gregs[_REG_R11]) -@@ -381,18 +385,23 @@ struct macos_arm_context { - # define FP_sig(p) RFP_sig(p) - # define SP_sig(p) RSP_sig(p) - # define LR_sig(p) R31_sig(p) - #elif defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \ - defined(__PPC64LE__) - # define PC_sig(p) R32_sig(p) - # define SP_sig(p) R01_sig(p) - # define FP_sig(p) R01_sig(p) -+#elif defined(__s390x__) -+# define PC_sig(p) PSWa_sig(p) -+# define SP_sig(p) GR_sig(p, 15) -+# define FP_sig(p) GR_sig(p, 11) - #endif + # elif defined(__NetBSD__) + # define EIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EIP]) + # define EBP_sig(p) ((p)->uc_mcontext.__gregs[_REG_EBP]) + # define ESP_sig(p) ((p)->uc_mcontext.__gregs[_REG_ESP]) + # define RIP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RIP]) + # define RSP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RSP]) + # define RBP_sig(p) ((p)->uc_mcontext.__gregs[_REG_RBP]) + # define R11_sig(p) ((p)->uc_mcontext.__gregs[_REG_R11]) +@@ -399,16 +403,20 @@ struct macos_aarch64_context { + # define PC_sig(p) R32_sig(p) + # define SP_sig(p) R01_sig(p) + # define FP_sig(p) R01_sig(p) + # elif defined(__loongarch__) + # define PC_sig(p) EPC_sig(p) + # define FP_sig(p) RFP_sig(p) + # define SP_sig(p) RSP_sig(p) + # define LR_sig(p) RRA_sig(p) ++# elif defined(__s390x__) ++# define PC_sig(p) PSWa_sig(p) ++# define SP_sig(p) GR_sig(p, 15) ++# define FP_sig(p) GR_sig(p, 11) + # endif -+ static void SetContextPC(CONTEXT* context, uint8_t* pc) { - #ifdef PC_sig + # ifdef PC_sig *reinterpret_cast(&PC_sig(context)) = pc; - #else + # else MOZ_CRASH(); - #endif - } - + # endif diff --git a/mozilla-sandbox-fips.patch b/mozilla-sandbox-fips.patch deleted file mode 100644 index 8381299..0000000 --- a/mozilla-sandbox-fips.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: meissner@suse.com, cgrobertson@suse.com -Subject: allow Firefox to access addtional process information -References: -http://bugzilla.suse.com/show_bug.cgi?id=1167132 -bsc#1174284 - Firefox tab just crashed in FIPS mode - -diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp ---- a/security/sandbox/linux/Sandbox.cpp -+++ b/security/sandbox/linux/Sandbox.cpp -@@ -650,16 +650,17 @@ void SetMediaPluginSandbox(const char* a - SANDBOX_LOG_ERROR("failed to open plugin file %s: %s", aFilePath, - strerror(errno)); - MOZ_CRASH("failed while trying to open the plugin file "); - } - - auto files = new SandboxOpenedFiles(); - files->Add(std::move(plugin)); - files->Add("/dev/urandom", SandboxOpenedFile::Dup::YES); -+ files->Add("/dev/random", SandboxOpenedFile::Dup::YES); - files->Add("/etc/ld.so.cache"); // Needed for NSS in clearkey. - files->Add("/sys/devices/system/cpu/cpu0/tsc_freq_khz"); - files->Add("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"); - files->Add("/proc/cpuinfo"); // Info also available via CPUID instruction. - files->Add("/proc/sys/crypto/fips_enabled"); // Needed for NSS in clearkey. - #ifdef __i386__ - files->Add("/proc/self/auxv"); // Info also in process's address space. - #endif -diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp ---- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp -+++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp -@@ -315,16 +315,18 @@ void SandboxBrokerPolicyFactory::InitCon - policy->AddDir(rdwr, "/dev/dri"); - } - - // Bug 1575985: WASM library sandbox needs RW access to /dev/null - policy->AddPath(rdwr, "/dev/null"); - - // Read permissions - policy->AddPath(rdonly, "/dev/urandom"); -+ policy->AddPath(rdonly, "/dev/random"); -+ policy->AddPath(rdonly, "/proc/sys/crypto/fips_enabled"); - policy->AddPath(rdonly, "/proc/cpuinfo"); - policy->AddPath(rdonly, "/proc/meminfo"); - policy->AddDir(rdonly, "/sys/devices/cpu"); - policy->AddDir(rdonly, "/sys/devices/system/cpu"); - policy->AddDir(rdonly, "/lib"); - policy->AddDir(rdonly, "/lib64"); - policy->AddDir(rdonly, "/usr/lib"); - policy->AddDir(rdonly, "/usr/lib32"); diff --git a/mozilla-silence-no-return-type.patch b/mozilla-silence-no-return-type.patch index 21d327f..0979a0d 100644 --- a/mozilla-silence-no-return-type.patch +++ b/mozilla-silence-no-return-type.patch @@ -1,15 +1,11 @@ # HG changeset patch -# Parent 003da8fa06219e3355208e8e5d0818870b88f5ae +# Parent 72e5683524907256ec499f82bac513c29760b332 -diff --git a/Cargo.lock b/Cargo.lock ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -2072,18 +2072,16 @@ name = "glsl-to-cxx" - version = "0.1.0" - dependencies = [ - "glsl", - ] - +Index: firefox-102.0/Cargo.lock +=================================================================== +--- firefox-102.0.orig/Cargo.lock ++++ firefox-102.0/Cargo.lock +@@ -2218,8 +2218,6 @@ dependencies = [ [[package]] name = "glslopt" version = "0.1.9" @@ -18,41 +14,23 @@ diff --git a/Cargo.lock b/Cargo.lock dependencies = [ "cc", ] - - [[package]] - name = "goblin" - version = "0.1.3" - source = "registry+https://github.com/rust-lang/crates.io-index" -diff --git a/Cargo.toml b/Cargo.toml ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -78,16 +78,17 @@ opt-level = 2 - chardetng = { git = "https://github.com/hsivonen/chardetng", rev="302c995f91f44cf26e77dc4758ad56c3ff0153ad" } - chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" } - libudev-sys = { path = "dom/webauthn/libudev-sys" } - packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="8b4bd7d8229660a749dbe419a57ea01df9de5453" } - rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="5c8e79048d3ff6f434109e19d4aee4ff8624d3d7" } - nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } - spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu5" } - minidump_writer_linux = { git = "https://github.com/msirringhaus/minidump_writer_linux.git", rev = "85551909b95a5cf553a85dbcddfa5f117cfbbe0e" } +Index: firefox-102.0/Cargo.toml +=================================================================== +--- firefox-102.0.orig/Cargo.toml ++++ firefox-102.0/Cargo.toml +@@ -116,6 +116,7 @@ libudev-sys = { path = "dom/webauthn/lib + packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd", rev="c149d0a519bf878567c7630096737669ec2ff15f" } + midir = { git = "https://github.com/mozilla/midir.git", rev = "4c11f0ffb5d6a10de4aff40a7b81218b33b94e6f" } + minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" } +glslopt = { path = "third_party/rust/glslopt/" } - - [patch.crates-io.cranelift-codegen] - git = "https://github.com/bytecodealliance/wasmtime" - rev = "824fa69756523f2b6d49029fe25de94130b1f144" - - [patch.crates-io.cranelift-wasm] - git = "https://github.com/bytecodealliance/wasmtime" -diff --git a/gfx/skia/skia/include/codec/SkEncodedOrigin.h b/gfx/skia/skia/include/codec/SkEncodedOrigin.h ---- a/gfx/skia/skia/include/codec/SkEncodedOrigin.h -+++ b/gfx/skia/skia/include/codec/SkEncodedOrigin.h -@@ -36,12 +36,13 @@ static inline SkMatrix SkEncodedOriginTo - case kBottomRight_SkEncodedOrigin: return SkMatrix::MakeAll(-1, 0, w, 0, -1, h, 0, 0, 1); - case kBottomLeft_SkEncodedOrigin: return SkMatrix::MakeAll( 1, 0, 0, 0, -1, h, 0, 0, 1); - case kLeftTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, 1, 0, 0, 0, 0, 1); - case kRightTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, h, 1, 0, 0, 0, 0, 1); - case kRightBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, h, -1, 0, w, 0, 0, 1); + # Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2. + # There is not going to be new version of mio 0.6, mio now being >= 0.7.11. +Index: firefox-102.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/include/codec/SkEncodedOrigin.h ++++ firefox-102.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h +@@ -41,6 +41,7 @@ static inline SkMatrix SkEncodedOriginTo case kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, -1, 0, w, 0, 0, 1); } SK_ABORT("Unexpected origin"); @@ -60,16 +38,11 @@ diff --git a/gfx/skia/skia/include/codec/SkEncodedOrigin.h b/gfx/skia/skia/inclu } - #endif // SkEncodedOrigin_DEFINED -diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include/private/GrTypesPriv.h ---- a/gfx/skia/skia/include/private/GrTypesPriv.h -+++ b/gfx/skia/skia/include/private/GrTypesPriv.h -@@ -535,32 +535,34 @@ static inline GrSLType GrSLCombinedSampl - return kTexture2DSampler_GrSLType; - case GrTextureType::kRectangle: - return kTexture2DRectSampler_GrSLType; - case GrTextureType::kExternal: - return kTextureExternalSampler_GrSLType; +Index: firefox-102.0/gfx/skia/skia/include/private/GrTypesPriv.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/include/private/GrTypesPriv.h ++++ firefox-102.0/gfx/skia/skia/include/private/GrTypesPriv.h +@@ -540,6 +540,7 @@ static inline GrSLType GrSLCombinedSampl default: SK_ABORT("Unexpected texture type"); } @@ -77,16 +50,7 @@ diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include } /** Rectangle and external textures only support the clamp wrap mode and do not support - * MIP maps. - */ - static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) { - switch (type) { - case GrTextureType::k2D: - return false; - case GrTextureType::kRectangle: - return true; - case GrTextureType::kExternal: - return true; +@@ -556,6 +557,7 @@ static inline bool GrTextureTypeHasRestr default: SK_ABORT("Unexpected texture type"); } @@ -94,17 +58,7 @@ diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include } static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) { - switch (type) { - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - return true; -@@ -853,16 +855,17 @@ static inline size_t GrCompressedFormatD - switch (compressionType) { - case SkImage::kETC1_CompressionType: - SkASSERT((width & 3) == 0); - SkASSERT((height & 3) == 0); - return (width >> 2) * (height >> 2) * 8; +@@ -858,6 +860,7 @@ static inline size_t GrCompressedFormatD } SK_ABORT("Invalid pixel config"); @@ -112,20 +66,11 @@ diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include } /** - * Like SkColorType this describes a layout of pixel data in CPU memory. It specifies the channels, - * their type, and width. This exists so that the GPU backend can have private types that have no - * analog in the public facing SkColorType enum and omit types not implemented in the GPU backend. - * It does not refer to a texture format and the mapping to texture formats may be many-to-many. - * It does not specify the sRGB encoding of the stored values. The components are listed in order of -diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeometry.h ---- a/gfx/skia/skia/src/core/SkGeometry.h -+++ b/gfx/skia/skia/src/core/SkGeometry.h -@@ -177,28 +177,30 @@ static inline bool SkCubicIsDegenerate(S - case SkCubicType::kLocalCusp: - case SkCubicType::kCuspAtInfinity: - return false; - case SkCubicType::kQuadratic: - case SkCubicType::kLineOrPoint: +Index: firefox-102.0/gfx/skia/skia/src/core/SkGeometry.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/core/SkGeometry.h ++++ firefox-102.0/gfx/skia/skia/src/core/SkGeometry.h +@@ -182,6 +182,7 @@ static inline bool SkCubicIsDegenerate(S return true; } SK_ABORT("Invalid SkCubicType"); @@ -133,12 +78,7 @@ diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeom } static inline const char* SkCubicTypeName(SkCubicType type) { - switch (type) { - case SkCubicType::kSerpentine: return "kSerpentine"; - case SkCubicType::kLoop: return "kLoop"; - case SkCubicType::kLocalCusp: return "kLocalCusp"; - case SkCubicType::kCuspAtInfinity: return "kCuspAtInfinity"; - case SkCubicType::kQuadratic: return "kQuadratic"; +@@ -194,6 +195,7 @@ static inline const char* SkCubicTypeNam case SkCubicType::kLineOrPoint: return "kLineOrPoint"; } SK_ABORT("Invalid SkCubicType"); @@ -146,20 +86,11 @@ diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeom } /** Returns the cubic classification. - - t[],s[] are set to the two homogeneous parameter values at which points the lines L & M - intersect with K, sorted from smallest to largest and oriented so positive values of the - implicit are on the "left" side. For a serpentine curve they are the inflection points. For a - loop they are the double point. For a local cusp, they are both equal and denote the cusp point. -diff --git a/gfx/skia/skia/src/core/SkTextBlob.cpp b/gfx/skia/skia/src/core/SkTextBlob.cpp ---- a/gfx/skia/skia/src/core/SkTextBlob.cpp -+++ b/gfx/skia/skia/src/core/SkTextBlob.cpp -@@ -196,16 +196,17 @@ unsigned SkTextBlob::ScalarsPerGlyph(Gly - } - - void SkTextBlob::operator delete(void* p) { - sk_free(p); - } +Index: firefox-102.0/gfx/skia/skia/src/core/SkTextBlob.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/core/SkTextBlob.cpp ++++ firefox-102.0/gfx/skia/skia/src/core/SkTextBlob.cpp +@@ -201,6 +201,7 @@ void SkTextBlob::operator delete(void* p void* SkTextBlob::operator new(size_t) { SK_ABORT("All blobs are created by placement new."); @@ -167,20 +98,11 @@ diff --git a/gfx/skia/skia/src/core/SkTextBlob.cpp b/gfx/skia/skia/src/core/SkTe } void* SkTextBlob::operator new(size_t, void* p) { - return p; - } - - SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob) - : fCurrentRun(SkTextBlob::RunRecord::First(blob)) { -diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.cpp b/gfx/skia/skia/src/core/SkTypeface_remote.cpp ---- a/gfx/skia/skia/src/core/SkTypeface_remote.cpp -+++ b/gfx/skia/skia/src/core/SkTypeface_remote.cpp -@@ -24,16 +24,17 @@ void SkScalerContextProxy::initCache(SkS - SkASSERT(cache != nullptr); - - fCache = cache; - fStrikeCache = strikeCache; - } +Index: firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/core/SkTypeface_remote.cpp ++++ firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.cpp +@@ -29,6 +29,7 @@ void SkScalerContextProxy::initCache(SkS unsigned SkScalerContextProxy::generateGlyphCount() { SK_ABORT("Should never be called."); @@ -188,20 +110,11 @@ diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.cpp b/gfx/skia/skia/src/co } bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) { - return false; - } - - void SkScalerContextProxy::generateMetrics(SkGlyph* glyph) { - TRACE_EVENT1("skia", "generateMetrics", "rec", TRACE_STR_COPY(this->getRec().dump().c_str())); -diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core/SkTypeface_remote.h ---- a/gfx/skia/skia/src/core/SkTypeface_remote.h -+++ b/gfx/skia/skia/src/core/SkTypeface_remote.h -@@ -58,46 +58,54 @@ public: - , fGlyphCount{glyphCount} - , fIsLogging{isLogging} - , fDiscardableManager{std::move(manager)} {} - SkFontID remoteTypefaceID() const {return fFontId;} - int glyphCount() const {return fGlyphCount;} +Index: firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/core/SkTypeface_remote.h ++++ firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.h +@@ -63,23 +63,28 @@ public: bool isLogging() const {return fIsLogging;} protected: @@ -231,7 +144,7 @@ diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core } void onGetFamilyName(SkString* familyName) const override { // Used by SkStrikeCache::DumpMemoryStatistics. - *familyName = ""; +@@ -87,12 +92,15 @@ protected: } SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override { SK_ABORT("Should never be called."); @@ -247,17 +160,7 @@ diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core } SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects, const SkDescriptor* desc) const override { - return new SkScalerContextProxy(sk_ref_sp(const_cast(this)), effects, - desc, fDiscardableManager); - } - void onFilterRec(SkScalerContextRec* rec) const override { - // The rec filtering is already applied by the server when generating -@@ -111,26 +119,28 @@ protected: - } - - void getPostScriptGlyphNames(SkString*) const override { - SK_ABORT("Should never be called."); - } +@@ -116,6 +124,7 @@ protected: std::unique_ptr onGetAdvancedMetrics() const override { SK_ABORT("Should never be called."); @@ -265,10 +168,7 @@ diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core } void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override { SK_ABORT("Should never be called."); - } - int onCountGlyphs() const override { - return this->glyphCount(); - } +@@ -126,6 +135,7 @@ protected: void* onGetCTFontRef() const override { SK_ABORT("Should never be called."); @@ -276,20 +176,11 @@ diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core } private: - const SkFontID fFontId; - const int fGlyphCount; - const bool fIsLogging; - sk_sp fDiscardableManager; - -diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp ---- a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp -+++ b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp -@@ -139,16 +139,17 @@ static GrTextureDomain::Mode to_texture_ - case SkTileMode::kDecal: - return GrTextureDomain::kDecal_Mode; - case SkTileMode::kMirror: - // TODO (michaelludwig) - Support mirror mode, treat as repeat for now - case SkTileMode::kRepeat: +Index: firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp ++++ firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp +@@ -144,6 +144,7 @@ static GrTextureDomain::Mode to_texture_ return GrTextureDomain::kRepeat_Mode; default: SK_ABORT("Unsupported tile mode."); @@ -297,20 +188,11 @@ diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/ } } #endif - - // This is defined by the SVG spec: - // https://drafts.fxtf.org/filter-effects/#feGaussianBlurElement - static int calculate_window(double sigma) { - // NB 136 is the largest sigma that will not cause a buffer full of 255 mask values to overflow -diff --git a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp ---- a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp -+++ b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp -@@ -1696,16 +1696,17 @@ static SkImageFilterLight* create_random - return new SkPointLight(random_point3(random), random->nextU()); - } - case 2: { - return new SkSpotLight(random_point3(random), random_point3(random), - random->nextUScalar1(), random->nextUScalar1(), random->nextU()); +Index: firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp ++++ firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp +@@ -1701,6 +1701,7 @@ static SkImageFilterLight* create_random } default: SK_ABORT("Unexpected value."); @@ -318,20 +200,11 @@ diff --git a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp b/ } } - std::unique_ptr GrDiffuseLightingEffect::TestCreate(GrProcessorTestData* d) { - int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx - : GrProcessorUnitTest::kAlphaTextureIdx; - sk_sp proxy = d->textureProxy(texIdx); - SkScalar surfaceScale = d->fRandom->nextSScalar1(); -diff --git a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp ---- a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp -+++ b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp -@@ -64,16 +64,17 @@ int SkFontMgr_Indirect::onCountFamilies( - } - - void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const { - SK_ABORT("Not implemented"); - } +Index: firefox-102.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp ++++ firefox-102.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp +@@ -69,6 +69,7 @@ void SkFontMgr_Indirect::onGetFamilyName SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const { SK_ABORT("Not implemented"); @@ -339,20 +212,11 @@ diff --git a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp b/gfx/skia/skia/src/ } SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { - return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName)); - } - - SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const { - if (id.fDataId == SkFontIdentity::kInvalidDataId) { -diff --git a/gfx/skia/skia/src/gpu/GrDataUtils.cpp b/gfx/skia/skia/src/gpu/GrDataUtils.cpp ---- a/gfx/skia/skia/src/gpu/GrDataUtils.cpp -+++ b/gfx/skia/skia/src/gpu/GrDataUtils.cpp -@@ -123,25 +123,27 @@ static int num_ETC1_blocks(int w, int h) - - size_t GrCompressedDataSize(SkImage::CompressionType type, int width, int height) { - switch (type) { - case SkImage::kETC1_CompressionType: - int numBlocks = num_ETC1_blocks(width, height); +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrDataUtils.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrDataUtils.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrDataUtils.cpp +@@ -128,6 +128,7 @@ size_t GrCompressedDataSize(SkImage::Com return numBlocks * sizeof(ETC1Block); } SK_ABORT("Unexpected compression type"); @@ -360,9 +224,7 @@ diff --git a/gfx/skia/skia/src/gpu/GrDataUtils.cpp b/gfx/skia/skia/src/gpu/GrDat } size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) { - switch (type) { - case SkImage::kETC1_CompressionType: - int numBlocksWidth = num_ETC1_blocks_w(width); +@@ -137,6 +138,7 @@ size_t GrCompressedRowBytes(SkImage::Com return numBlocksWidth * sizeof(ETC1Block); } SK_ABORT("Unexpected compression type"); @@ -370,20 +232,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrDataUtils.cpp b/gfx/skia/skia/src/gpu/GrDat } // Fill in 'dest' with ETC1 blocks derived from 'colorf' - static void fillin_ETC1_with_color(int width, int height, const SkColor4f& colorf, void* dest) { - SkColor color = colorf.toSkColor(); - - ETC1Block block; - create_etc1_block(color, &block); -diff --git a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h ---- a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h -+++ b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h -@@ -370,16 +370,17 @@ protected: - const Args&... samps) { - return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); - } - inline static const TextureSampler& IthTextureSampler(int i); - +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrFragmentProcessor.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrFragmentProcessor.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrFragmentProcessor.h +@@ -375,6 +375,7 @@ protected: private: virtual SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& /* inputColor */) const { SK_ABORT("Subclass must override this if advertising this optimization."); @@ -391,20 +244,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h b/gfx/skia/skia/src/gpu } /** Returns a new instance of the appropriate *GL* implementation class - for the given GrFragmentProcessor; caller is responsible for deleting - the object. */ - virtual GrGLSLFragmentProcessor* onCreateGLSLInstance() const = 0; - - /** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */ -diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.cpp b/gfx/skia/skia/src/gpu/GrPathRendering.cpp ---- a/gfx/skia/skia/src/gpu/GrPathRendering.cpp -+++ b/gfx/skia/skia/src/gpu/GrPathRendering.cpp -@@ -14,16 +14,17 @@ - #include "src/gpu/GrPathRendering.h" - #include "src/gpu/GrProgramInfo.h" - #include "src/gpu/GrRenderTarget.h" - - const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fill) { +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrPathRendering.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.cpp +@@ -19,6 +19,7 @@ const GrUserStencilSettings& GrPathRende switch (fill) { default: SK_ABORT("Unexpected path fill."); @@ -412,20 +256,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.cpp b/gfx/skia/skia/src/gpu/G case GrPathRendering::kWinding_FillType: { constexpr static GrUserStencilSettings kWindingStencilPass( GrUserStencilSettings::StaticInit< - 0xffff, - GrUserStencilTest::kAlwaysIfInClip, - 0xffff, - GrUserStencilOp::kIncWrap, - GrUserStencilOp::kIncWrap, -diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.h b/gfx/skia/skia/src/gpu/GrPathRendering.h ---- a/gfx/skia/skia/src/gpu/GrPathRendering.h -+++ b/gfx/skia/skia/src/gpu/GrPathRendering.h -@@ -58,16 +58,17 @@ public: - return 1; - case kTranslate_PathTransformType: - return 2; - case kAffine_PathTransformType: - return 6; +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrPathRendering.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.h +@@ -63,6 +63,7 @@ public: default: SK_ABORT("Unknown path transform type"); @@ -433,20 +268,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.h b/gfx/skia/skia/src/gpu/GrP } } - // No native support for inverse at this time - enum FillType { - /** Specifies that "inside" is computed by a non-zero sum of signed - edge crossings - */ -diff --git a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp ---- a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp -+++ b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp -@@ -15,11 +15,12 @@ std::unique_ptr GrP - std::unique_ptr fp; - do { - fp = GrFragmentProcessorTestFactory::Make(data); - SkASSERT(fp); - } while (fp->numChildProcessors() != 0); +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp +@@ -20,6 +20,7 @@ std::unique_ptr GrP return fp; #else SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); @@ -454,15 +280,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp b/gfx/skia/skia/src/g #endif } #endif -diff --git a/gfx/skia/skia/src/gpu/GrReducedClip.cpp b/gfx/skia/skia/src/gpu/GrReducedClip.cpp ---- a/gfx/skia/skia/src/gpu/GrReducedClip.cpp -+++ b/gfx/skia/skia/src/gpu/GrReducedClip.cpp -@@ -520,16 +520,17 @@ GrReducedClip::ClipResult GrReducedClip: - GrAA(element->isAA())); - - case Element::DeviceSpaceType::kPath: - return this->addAnalyticFP(element->getDeviceSpacePath(), - Invert(element->isInverseFilled()), GrAA(element->isAA())); +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrReducedClip.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrReducedClip.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrReducedClip.cpp +@@ -525,6 +525,7 @@ GrReducedClip::ClipResult GrReducedClip: } SK_ABORT("Unexpected DeviceSpaceType"); @@ -470,17 +292,7 @@ diff --git a/gfx/skia/skia/src/gpu/GrReducedClip.cpp b/gfx/skia/skia/src/gpu/GrR } GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) { - switch (element->getDeviceSpaceType()) { - case Element::DeviceSpaceType::kEmpty: - return ClipResult::kMadeEmpty; - - case Element::DeviceSpaceType::kRect: -@@ -586,16 +587,17 @@ GrReducedClip::ClipResult GrReducedClip: - } - - case Element::DeviceSpaceType::kPath: - return this->addAnalyticFP(element->getDeviceSpacePath(), - Invert(!element->isInverseFilled()), GrAA(element->isAA())); +@@ -591,6 +592,7 @@ GrReducedClip::ClipResult GrReducedClip: } SK_ABORT("Unexpected DeviceSpaceType"); @@ -488,20 +300,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrReducedClip.cpp b/gfx/skia/skia/src/gpu/GrR } inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) { - SkIRect window; - if (!elementIsAA) { - elementInteriorRect.round(&window); - } else { - elementInteriorRect.roundIn(&window); -diff --git a/gfx/skia/skia/src/gpu/GrResourceCache.cpp b/gfx/skia/skia/src/gpu/GrResourceCache.cpp ---- a/gfx/skia/skia/src/gpu/GrResourceCache.cpp -+++ b/gfx/skia/skia/src/gpu/GrResourceCache.cpp -@@ -35,27 +35,29 @@ DECLARE_SKMESSAGEBUS_MESSAGE(GrTextureFr - ////////////////////////////////////////////////////////////////////////////// - - GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() { - static std::atomic nextType{INHERITED::kInvalidDomain + 1}; - +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrResourceCache.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrResourceCache.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrResourceCache.cpp +@@ -40,6 +40,7 @@ GrScratchKey::ResourceType GrScratchKey: int32_t type = nextType++; if (type > SkTo(UINT16_MAX)) { SK_ABORT("Too many Resource Types"); @@ -509,11 +312,7 @@ diff --git a/gfx/skia/skia/src/gpu/GrResourceCache.cpp b/gfx/skia/skia/src/gpu/G } return static_cast(type); - } - - GrUniqueKey::Domain GrUniqueKey::GenerateDomain() { - static std::atomic nextDomain{INHERITED::kInvalidDomain + 1}; - +@@ -51,6 +52,7 @@ GrUniqueKey::Domain GrUniqueKey::Generat int32_t domain = nextDomain++; if (domain > SkTo(UINT16_MAX)) { SK_ABORT("Too many GrUniqueKey Domains"); @@ -521,20 +320,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrResourceCache.cpp b/gfx/skia/skia/src/gpu/G } return static_cast(domain); - } - - uint32_t GrResourceKeyHash(const uint32_t* data, size_t size) { - return SkOpts::hash(data, size); - } -diff --git a/gfx/skia/skia/src/gpu/GrShaderVar.cpp b/gfx/skia/skia/src/gpu/GrShaderVar.cpp ---- a/gfx/skia/skia/src/gpu/GrShaderVar.cpp -+++ b/gfx/skia/skia/src/gpu/GrShaderVar.cpp -@@ -13,30 +13,32 @@ static const char* type_modifier_string( - switch (t) { - case GrShaderVar::kNone_TypeModifier: return ""; - case GrShaderVar::kIn_TypeModifier: return "in"; - case GrShaderVar::kInOut_TypeModifier: return "inout"; - case GrShaderVar::kOut_TypeModifier: return "out"; +Index: firefox-102.0/gfx/skia/skia/src/gpu/GrShaderVar.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrShaderVar.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/GrShaderVar.cpp +@@ -18,6 +18,7 @@ static const char* type_modifier_string( case GrShaderVar::kUniform_TypeModifier: return "uniform"; } SK_ABORT("Unknown shader variable type modifier."); @@ -542,14 +332,7 @@ diff --git a/gfx/skia/skia/src/gpu/GrShaderVar.cpp b/gfx/skia/skia/src/gpu/GrSha } void GrShaderVar::setIOType(GrIOType ioType) { - switch (ioType) { - case kRW_GrIOType: - return; - case kRead_GrIOType: - this->addModifier("readonly"); - return; - case kWrite_GrIOType: - this->addModifier("writeonly"); +@@ -32,6 +33,7 @@ void GrShaderVar::setIOType(GrIOType ioT return; } SK_ABORT("Unknown io type."); @@ -557,20 +340,11 @@ diff --git a/gfx/skia/skia/src/gpu/GrShaderVar.cpp b/gfx/skia/skia/src/gpu/GrSha } void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const { - SkString layout = fLayoutQualifier; - if (!fLayoutQualifier.isEmpty()) { - out->appendf("layout(%s) ", fLayoutQualifier.c_str()); - } - out->append(fExtraModifiers); -diff --git a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp ---- a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp -+++ b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp -@@ -278,16 +278,17 @@ static inline GrPrimitiveType point_mode - case SkCanvas::kPoints_PointMode: - return GrPrimitiveType::kPoints; - case SkCanvas::kLines_PointMode: - return GrPrimitiveType::kLines; - case SkCanvas::kPolygon_PointMode: +Index: firefox-102.0/gfx/skia/skia/src/gpu/SkGpuDevice.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/SkGpuDevice.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/SkGpuDevice.cpp +@@ -283,6 +283,7 @@ static inline GrPrimitiveType point_mode return GrPrimitiveType::kLineStrip; } SK_ABORT("Unexpected mode"); @@ -578,20 +352,11 @@ diff --git a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp b/gfx/skia/skia/src/gpu/SkGpu } void SkGpuDevice::drawPoints(SkCanvas::PointMode mode, - size_t count, const SkPoint pts[], const SkPaint& paint) { - ASSERT_SINGLE_OWNER - GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPoints", fContext.get()); - SkScalar width = paint.getStrokeWidth(); - if (width < 0) { -diff --git a/gfx/skia/skia/src/gpu/SkGr.h b/gfx/skia/skia/src/gpu/SkGr.h ---- a/gfx/skia/skia/src/gpu/SkGr.h -+++ b/gfx/skia/skia/src/gpu/SkGr.h -@@ -154,16 +154,17 @@ static inline GrPrimitiveType SkVertexMo - case SkVertices::kTriangles_VertexMode: - return GrPrimitiveType::kTriangles; - case SkVertices::kTriangleStrip_VertexMode: - return GrPrimitiveType::kTriangleStrip; - case SkVertices::kTriangleFan_VertexMode: +Index: firefox-102.0/gfx/skia/skia/src/gpu/SkGr.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/SkGr.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/SkGr.h +@@ -159,6 +159,7 @@ static inline GrPrimitiveType SkVertexMo break; } SK_ABORT("Invalid mode"); @@ -599,20 +364,11 @@ diff --git a/gfx/skia/skia/src/gpu/SkGr.h b/gfx/skia/skia/src/gpu/SkGr.h } ////////////////////////////////////////////////////////////////////////////// - - GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkBlendModeCoeff::kZero); - GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkBlendModeCoeff::kOne); - GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkBlendModeCoeff::kSC); - GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkBlendModeCoeff::kISC); -diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h ---- a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h -+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h -@@ -235,16 +235,17 @@ inline const char* GrCCCoverageProcessor - switch (type) { - case PrimitiveType::kTriangles: return "kTriangles"; - case PrimitiveType::kWeightedTriangles: return "kWeightedTriangles"; - case PrimitiveType::kQuadratics: return "kQuadratics"; - case PrimitiveType::kCubics: return "kCubics"; +Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h +@@ -240,6 +240,7 @@ inline const char* GrCCCoverageProcessor case PrimitiveType::kConics: return "kConics"; } SK_ABORT("Invalid PrimitiveType"); @@ -620,20 +376,11 @@ diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h b/gfx/skia/skia/ } inline void GrCCCoverageProcessor::TriPointInstance::set( - const SkPoint p[3], const Sk2f& translate, Ordering ordering) { - this->set(p[0], p[1], p[2], translate, ordering); - } - - inline void GrCCCoverageProcessor::TriPointInstance::set( -diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp ---- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp -+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp -@@ -55,16 +55,17 @@ static GrCCStrokeGeometry::Verb join_ver - case SkPaint::kBevel_Join: - return Verb::kBevelJoin; - case SkPaint::kMiter_Join: - return Verb::kMiterJoin; - case SkPaint::kRound_Join: +Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp +@@ -60,6 +60,7 @@ static GrCCStrokeGeometry::Verb join_ver return Verb::kRoundJoin; } SK_ABORT("Invalid SkPaint::Join."); @@ -641,35 +388,22 @@ diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp b/gfx/skia/skia/s } void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth, - InstanceTallies* tallies) { - SkASSERT(!fInsideContour); - // Client should have already converted the stroke to device space (i.e. width=1 for hairline). - SkASSERT(strokeDevWidth > 0); - -diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h ---- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h -+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h -@@ -170,10 +170,11 @@ inline bool GrCCStrokeGeometry::IsIntern - case Verb::kMiterJoin: - case Verb::kRoundJoin: - case Verb::kSquareCap: - case Verb::kRoundCap: - case Verb::kEndContour: +Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h +@@ -175,5 +175,6 @@ inline bool GrCCStrokeGeometry::IsIntern return false; } SK_ABORT("Invalid GrCCStrokeGeometry::Verb."); + SkUNREACHABLE; } #endif -diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp ---- a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp -+++ b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp -@@ -159,16 +159,17 @@ GrPathRenderer::CanDrawPath GrCoverageCo - return CanDrawPath::kYes; - } - - case SkStrokeRec::kStrokeAndFill_Style: - return CanDrawPath::kNo; +Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp +@@ -164,6 +164,7 @@ GrPathRenderer::CanDrawPath GrCoverageCo } SK_ABORT("Invalid stroke style."); @@ -677,34 +411,21 @@ diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/gfx } bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) { - SkASSERT(!fFlushing); - - SkIRect clipIBounds; - GrRenderTargetContext* rtc = args.fRenderTargetContext; - args.fClip->getConservativeBounds(rtc->width(), rtc->height(), &clipIBounds, nullptr); -diff --git a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp ---- a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp -+++ b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp -@@ -545,9 +545,10 @@ GrGLSLPrimitiveProcessor* GrVSCoveragePr - case PrimitiveType::kWeightedTriangles: - return new Impl(std::move(shader), 3); - case PrimitiveType::kQuadratics: - case PrimitiveType::kCubics: - case PrimitiveType::kConics: +Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp +@@ -550,4 +550,5 @@ GrGLSLPrimitiveProcessor* GrVSCoveragePr return new Impl(std::move(shader), 4); } SK_ABORT("Invalid PrimitiveType"); + SkUNREACHABLE; } -diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp ---- a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp -+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp -@@ -34,17 +34,19 @@ static dawn::LoadOp to_dawn_load_op(GrLo - // Load should be equivalent to DontCare for desktop; Clear would - // probably be better for tilers. If Dawn does add DontCare - // as an extension, use it here. - return dawn::LoadOp::Load; - case GrLoadOp::kClear: +Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp +@@ -39,7 +39,9 @@ static dawn::LoadOp to_dawn_load_op(GrLo return dawn::LoadOp::Clear; default: SK_ABORT("Invalid LoadOp"); @@ -714,20 +435,11 @@ diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp b/gfx/skia/skia/ } GrDawnOpsRenderPass::GrDawnOpsRenderPass(GrDawnGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin, - const LoadAndStoreInfo& colorInfo, - const StencilLoadAndStoreInfo& stencilInfo) - : INHERITED(rt, origin) - , fGpu(gpu) - , fColorInfo(colorInfo) { -diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp ---- a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp -+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp -@@ -90,16 +90,17 @@ uint32_t grsltype_to_alignment_mask(GrSL - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kTexture2D_GrSLType: - case kSampler_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp +@@ -95,6 +95,7 @@ uint32_t grsltype_to_alignment_mask(GrSL break; } SK_ABORT("Unexpected type"); @@ -735,17 +447,7 @@ diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp b/gfx/skia/skia } static inline uint32_t grsltype_to_size(GrSLType type) { - switch(type) { - case kByte_GrSLType: - case kUByte_GrSLType: - return 1; - case kByte2_GrSLType: -@@ -168,16 +169,17 @@ static inline uint32_t grsltype_to_size( - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kTexture2D_GrSLType: - case kSampler_GrSLType: +@@ -173,6 +174,7 @@ static inline uint32_t grsltype_to_size( break; } SK_ABORT("Unexpected type"); @@ -753,20 +455,11 @@ diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp b/gfx/skia/skia } uint32_t get_ubo_offset(uint32_t* currentOffset, - GrSLType type, - int arrayCount) { - uint32_t alignmentMask = grsltype_to_alignment_mask(type); - // We want to use the std140 layout here, so we must make arrays align to 16 bytes. - if (arrayCount || type == kFloat2x2_GrSLType) { -diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp ---- a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp -+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp -@@ -71,16 +71,17 @@ static inline int grsltype_to_location_s - case kUByte_GrSLType: - return 1; - case kTexture2D_GrSLType: - return 0; - case kSampler_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp +@@ -76,6 +76,7 @@ static inline int grsltype_to_location_s return 0; } SK_ABORT("Unexpected type"); @@ -774,20 +467,11 @@ diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp b/gfx/skia/skia } static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) { - int locationIndex = 0; - for (int i = 0; i < vars.count(); ++i) { - GrShaderVar& var = vars[i]; - SkString location; - location.appendf("location = %d", locationIndex); -diff --git a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp ---- a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp -+++ b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp -@@ -53,16 +53,17 @@ void main() { - case InputMode::kIgnore: - return color; - case InputMode::kModulateA: - return color * input.fA; - case InputMode::kModulateRGBA: +Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp ++++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp +@@ -58,6 +58,7 @@ void main() { return color * input; } SK_ABORT("Unexpected mode"); @@ -795,20 +479,11 @@ diff --git a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp b/gfx/skia/s } } - @test(d) { - SkPMColor4f color; - int colorPicker = d->fRandom->nextULessThan(3); - switch (colorPicker) { - case 0: { -diff --git a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp ---- a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp -+++ b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp -@@ -199,16 +199,17 @@ const GrXPFactory* GrCoverageSetOpXPFact - static _CONSTEXPR_ const GrCoverageSetOpXPFactory gRevDiffCDXPF( - SkRegion::kReverseDifference_Op, false); - return &gRevDiffCDXPF; - } - } +Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp +@@ -204,6 +204,7 @@ const GrXPFactory* GrCoverageSetOpXPFact } #undef _CONSTEXPR_ SK_ABORT("Unknown region op."); @@ -816,20 +491,11 @@ diff --git a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp b/gfx/skia/skia } sk_sp GrCoverageSetOpXPFactory::makeXferProcessor( - const GrProcessorAnalysisColor&, - GrProcessorAnalysisCoverage, - bool hasMixedSamples, - const GrCaps& caps, - GrClampType) const { -diff --git a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp ---- a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp -+++ b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp -@@ -748,16 +748,17 @@ const GrXPFactory* GrPorterDuffXPFactory - case SkBlendMode::kPlus: - return &gPlusPDXPF; - case SkBlendMode::kModulate: - return &gModulatePDXPF; - case SkBlendMode::kScreen: +Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp +@@ -753,6 +753,7 @@ const GrXPFactory* GrPorterDuffXPFactory return &gScreenPDXPF; default: SK_ABORT("Unexpected blend mode."); @@ -837,20 +503,11 @@ diff --git a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/gfx/s } } - sk_sp GrPorterDuffXPFactory::makeXferProcessor( - const GrProcessorAnalysisColor& color, GrProcessorAnalysisCoverage coverage, - bool hasMixedSamples, const GrCaps& caps, GrClampType clampType) const { - BlendFormula blendFormula; - bool isLCD = coverage == GrProcessorAnalysisCoverage::kLCD; -diff --git a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp ---- a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp -+++ b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp -@@ -149,16 +149,17 @@ public: - return kHalf4x4_GrSLType; - } else if (type == *fContext.fBool_Type) { - return kBool_GrSLType; - } else if (type == *fContext.fInt_Type) { - return kInt_GrSLType; +Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp +@@ -154,6 +154,7 @@ public: } printf("%s\n", SkSL::String(type.fName).c_str()); SK_ABORT("unsupported uniform type"); @@ -858,17 +515,7 @@ diff --git a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp b/gfx/skia/skia/src/gpu/ } void emitCode(EmitArgs& args) override { - for (const auto& v : fInAndUniformVars) { - if (v->fModifiers.fFlags & SkSL::Modifiers::kUniform_Flag && v->fType != - *fContext.fFragmentProcessor_Type) { - fUniformHandles.push_back(args.fUniformHandler->addUniform( - kFragment_GrShaderFlag, -@@ -563,11 +564,12 @@ std::unique_ptr GrS - } - std::unique_ptr result = GrSkSLFP::Make(d->context(), overdrawIndex, - "Overdraw", SKSL_OVERDRAW_SRC, - &inputs, sizeof(inputs)); - return std::unique_ptr(result.release()); +@@ -568,6 +569,7 @@ std::unique_ptr GrS } } SK_ABORT("unreachable"); @@ -876,15 +523,11 @@ diff --git a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp b/gfx/skia/skia/src/gpu/ } #endif -diff --git a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h ---- a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h -+++ b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h -@@ -36,16 +36,17 @@ public: - case InputMode::kIgnore: - return color; - case InputMode::kModulateA: - return color * input.fA; - case InputMode::kModulateRGBA: +Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h +@@ -41,6 +41,7 @@ public: return color * input; } SK_ABORT("Unexpected mode"); @@ -892,20 +535,11 @@ diff --git a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h b/g } static std::unique_ptr Make(SkPMColor4f color, InputMode mode) { return std::unique_ptr(new GrConstColorProcessor(color, mode)); - } - GrConstColorProcessor(const GrConstColorProcessor& src); - std::unique_ptr clone() const override; - const char* name() const override { return "ConstColorProcessor"; } - SkPMColor4f color; -diff --git a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp ---- a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp -+++ b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp -@@ -159,16 +159,17 @@ SkRect GrShape::bounds() const { - return fRRectData.fRRect.getBounds(); - case Type::kArc: - // Could make this less conservative by looking at angles. - return fArcData.fOval; - case Type::kPath: +Index: firefox-102.0/gfx/skia/skia/src/gpu/geometry/GrShape.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/geometry/GrShape.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/geometry/GrShape.cpp +@@ -164,6 +164,7 @@ SkRect GrShape::bounds() const { return this->path().getBounds(); } SK_ABORT("Unknown shape type"); @@ -913,17 +547,7 @@ diff --git a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp b/gfx/skia/skia/src/gpu/ } SkRect GrShape::styledBounds() const { - if (this->isEmpty() && !fStyle.hasNonDashPathEffect()) { - return SkRect::MakeEmpty(); - } - - SkRect bounds; -@@ -249,16 +250,17 @@ int GrShape::unstyledKeySize() const { - if (dataKeySize >= 0) { - return dataKeySize; - } - // The key is the path ID and fill type. - return 2; +@@ -254,6 +255,7 @@ int GrShape::unstyledKeySize() const { } } SK_ABORT("Should never get here."); @@ -931,20 +555,11 @@ diff --git a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp b/gfx/skia/skia/src/gpu/ } void GrShape::writeUnstyledKey(uint32_t* key) const { - SkASSERT(this->unstyledKeySize()); - SkDEBUGCODE(uint32_t* origKey = key;) - if (fInheritedKey.count()) { - memcpy(key, fInheritedKey.get(), sizeof(uint32_t) * fInheritedKey.count()); - SkDEBUGCODE(key += fInheritedKey.count();) -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp -@@ -4154,16 +4154,17 @@ GrBackendFormat GrGLCaps::getBackendForm - case SkImage::kETC1_CompressionType: - // if ETC2 is available default to that format - if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) { - return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D); - } +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp +@@ -4159,6 +4159,7 @@ GrBackendFormat GrGLCaps::getBackendForm return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); } SK_ABORT("Invalid compression type"); @@ -952,34 +567,21 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp b/gfx/skia/skia/src/gpu/gl/Gr } GrSwizzle GrGLCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { - const auto& info = this->getFormatInfo(format.asGLFormat()); - for (int i = 0; i < info.fColorTypeInfoCount; ++i) { - const auto& ctInfo = info.fColorTypeInfos[i]; - if (ctInfo.fColorType == colorType) { - return ctInfo.fTextureSwizzle; -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp -@@ -63,9 +63,10 @@ bool GrGLGetGLSLGeneration(const GrGLInt - if (ver >= GR_GLSL_VER(2,0)) { - *generation = k330_GrGLSLGeneration; // ES 3.0 - } else { - *generation = k110_GrGLSLGeneration; - } +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp +@@ -68,4 +68,5 @@ bool GrGLGetGLSLGeneration(const GrGLInt return true; } SK_ABORT("Unknown GL Standard"); + SkUNREACHABLE; } -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp -@@ -191,16 +191,17 @@ static int gl_target_to_binding_index(Gr - case GR_GL_TEXTURE_2D: - return 0; - case GR_GL_TEXTURE_RECTANGLE: - return 1; - case GR_GL_TEXTURE_EXTERNAL: +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp +@@ -196,6 +196,7 @@ static int gl_target_to_binding_index(Gr return 2; } SK_ABORT("Unexpected GL texture target."); @@ -987,17 +589,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const { - return fTargetBindings[gl_target_to_binding_index(target)].fBoundResourceID; - } - - bool GrGLGpu::TextureUnitBindings::hasBeenModified(GrGLenum target) const { - return fTargetBindings[gl_target_to_binding_index(target)].fHasBeenModified; -@@ -229,39 +230,42 @@ void GrGLGpu::TextureUnitBindings::inval - - static GrGLenum filter_to_gl_mag_filter(GrSamplerState::Filter filter) { - switch (filter) { - case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST; - case GrSamplerState::Filter::kBilerp: return GR_GL_LINEAR; +@@ -234,6 +235,7 @@ static GrGLenum filter_to_gl_mag_filter( case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR; } SK_ABORT("Unknown filter"); @@ -1005,9 +597,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) { - switch (filter) { - case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST; - case GrSamplerState::Filter::kBilerp: return GR_GL_LINEAR; +@@ -243,6 +245,7 @@ static GrGLenum filter_to_gl_min_filter( case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR_MIPMAP_LINEAR; } SK_ABORT("Unknown filter"); @@ -1015,14 +605,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } static inline GrGLenum wrap_mode_to_gl_wrap(GrSamplerState::WrapMode wrapMode, - const GrCaps& caps) { - switch (wrapMode) { - case GrSamplerState::WrapMode::kClamp: return GR_GL_CLAMP_TO_EDGE; - case GrSamplerState::WrapMode::kRepeat: return GR_GL_REPEAT; - case GrSamplerState::WrapMode::kMirrorRepeat: return GR_GL_MIRRORED_REPEAT; - case GrSamplerState::WrapMode::kClampToBorder: - // May not be supported but should have been caught earlier - SkASSERT(caps.clampToBorderSupport()); +@@ -257,6 +260,7 @@ static inline GrGLenum wrap_mode_to_gl_w return GR_GL_CLAMP_TO_BORDER; } SK_ABORT("Unknown wrap mode"); @@ -1030,17 +613,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } /////////////////////////////////////////////////////////////////////////////// - - class GrGLGpu::SamplerObjectCache { - public: - SamplerObjectCache(GrGLGpu* gpu) : fGpu(gpu) { - fNumTextureUnits = fGpu->glCaps().shaderCaps()->maxFragmentSamplers(); -@@ -1102,17 +1106,17 @@ static bool renderbuffer_storage_msaa(co - GL_ALLOC_CALL(ctx.interface(), - RenderbufferStorageMultisampleES2EXT(GR_GL_RENDERBUFFER, - sampleCount, - format, - width, height)); +@@ -1107,7 +1111,7 @@ static bool renderbuffer_storage_msaa(co break; case GrGLCaps::kNone_MSFBOType: SK_ABORT("Shouldn't be here if we don't support multisampled renderbuffers."); @@ -1049,17 +622,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); } - - bool GrGLGpu::createRenderTargetObjects(const GrGLTexture::Desc& desc, - int sampleCount, - GrGLRenderTarget::IDs* rtIDs) { - rtIDs->fMSColorRenderbufferID = 0; -@@ -2270,19 +2274,20 @@ static GrGLenum gr_primitive_type_to_gl_ - case GrPrimitiveType::kPoints: - return GR_GL_POINTS; - case GrPrimitiveType::kLines: - return GR_GL_LINES; - case GrPrimitiveType::kLineStrip: +@@ -2275,9 +2279,10 @@ static GrGLenum gr_primitive_type_to_gl_ return GR_GL_LINE_STRIP; case GrPrimitiveType::kPath: SK_ABORT("non-mesh-based GrPrimitiveType"); @@ -1071,17 +634,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } void GrGLGpu::sendMeshToGpu(GrPrimitiveType primitiveType, const GrBuffer* vertexBuffer, - int vertexCount, int baseVertex) { - const GrGLenum glPrimType = gr_primitive_type_to_gl_mode(primitiveType); - if (this->glCaps().drawArraysBaseVertexIsBroken()) { - this->setupGeometry(nullptr, vertexBuffer, baseVertex, nullptr, 0, GrPrimitiveRestart::kNo); - GL_CALL(DrawArrays(glPrimType, 0, vertexCount)); -@@ -4001,17 +4006,18 @@ int GrGLGpu::TextureToCopyProgramIdx(GrT - switch (GrSLCombinedSamplerTypeForTextureType(texture->texturePriv().textureType())) { - case kTexture2DSampler_GrSLType: - return 0; - case kTexture2DRectSampler_GrSLType: - return 1; +@@ -4006,7 +4011,8 @@ int GrGLGpu::TextureToCopyProgramIdx(GrT case kTextureExternalSampler_GrSLType: return 2; default: @@ -1091,20 +644,11 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrG } } - #ifdef SK_ENABLE_DUMP_GPU - #include "src/utils/SkJSONWriter.h" - void GrGLGpu::onDumpJSON(SkJSONWriter* writer) const { - // We are called by the base class, which has already called beginObject(). We choose to nest - // all of our caps information in a named sub-object. -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp -@@ -192,16 +192,17 @@ inline bool init_path_object_for_general - - /* - * For now paths only natively support winding and even odd fill types - */ - static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill) { +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp +@@ -197,6 +197,7 @@ static GrPathRendering::FillType convert switch (fill) { default: SK_ABORT("Incomplete Switch\n"); @@ -1112,20 +656,11 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp b/gfx/skia/skia/src/gpu/gl/Gr case SkPath::kWinding_FillType: case SkPath::kInverseWinding_FillType: return GrPathRendering::kWinding_FillType; - case SkPath::kEvenOdd_FillType: - case SkPath::kInverseEvenOdd_FillType: - return GrPathRendering::kEvenOdd_FillType; - } - } -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp -@@ -20,30 +20,33 @@ GrTextureType GrGLTexture::TextureTypeFr - case GR_GL_TEXTURE_2D: - return GrTextureType::k2D; - case GR_GL_TEXTURE_RECTANGLE: - return GrTextureType::kRectangle; - case GR_GL_TEXTURE_EXTERNAL: +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp +@@ -25,6 +25,7 @@ GrTextureType GrGLTexture::TextureTypeFr return GrTextureType::kExternal; } SK_ABORT("Unexpected texture target"); @@ -1133,12 +668,7 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp b/gfx/skia/skia/src/gpu/gl } static inline GrGLenum target_from_texture_type(GrTextureType type) { - switch (type) { - case GrTextureType::k2D: - return GR_GL_TEXTURE_2D; - case GrTextureType::kRectangle: - return GR_GL_TEXTURE_RECTANGLE; - case GrTextureType::kExternal: +@@ -37,8 +38,10 @@ static inline GrGLenum target_from_textu return GR_GL_TEXTURE_EXTERNAL; default: SK_ABORT("Unexpected texture target"); @@ -1149,20 +679,11 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp b/gfx/skia/skia/src/gpu/gl } // Because this class is virtually derived from GrSurface we must explicitly call its constructor. - GrGLTexture::GrGLTexture(GrGLGpu* gpu, SkBudgeted budgeted, const Desc& desc, - GrMipMapsStatus mipMapsStatus) - : GrSurface(gpu, desc.fSize, desc.fConfig, GrProtected::kNo) - , INHERITED(gpu, desc.fSize, desc.fConfig, GrProtected::kNo, - TextureTypeFromTarget(desc.fTarget), mipMapsStatus) -diff --git a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp ---- a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp -+++ b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp -@@ -75,16 +75,17 @@ static AttribLayout attrib_layout(GrVert - case kUint_GrVertexAttribType: - return {false, 1, GR_GL_UNSIGNED_INT}; - case kUShort_norm_GrVertexAttribType: - return {true, 1, GR_GL_UNSIGNED_SHORT}; - case kUShort4_norm_GrVertexAttribType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp +@@ -80,6 +80,7 @@ static AttribLayout attrib_layout(GrVert return {true, 4, GR_GL_UNSIGNED_SHORT}; } SK_ABORT("Unknown vertex attrib type"); @@ -1170,34 +691,21 @@ diff --git a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp b/gfx/skia/skia/src/gp }; void GrGLAttribArrayState::set(GrGLGpu* gpu, - int index, - const GrBuffer* vertexBuffer, - GrVertexAttribType cpuType, - GrSLType gpuType, - GrGLsizei stride, -diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp ---- a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp -+++ b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp -@@ -93,9 +93,10 @@ const char* GrGLSLTypeString(GrSLType t) - case kUByte4_GrSLType: - return "ubyte4"; - case kTexture2D_GrSLType: - return "texture2D"; - case kSampler_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp +@@ -98,4 +98,5 @@ const char* GrGLSLTypeString(GrSLType t) return "sampler"; } SK_ABORT("Unknown shader var type."); + SkUNREACHABLE; } -diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp ---- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp -+++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp -@@ -30,16 +30,17 @@ static bool use_flat_interpolation(GrGLS - SkASSERT(!shaderCaps.preferFlatInterpolation() || - shaderCaps.flatInterpolationSupport()); - return shaderCaps.preferFlatInterpolation(); - case Interpolation::kMustBeFlat: - SkASSERT(shaderCaps.flatInterpolationSupport()); +Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp +@@ -35,6 +35,7 @@ static bool use_flat_interpolation(GrGLS return true; } SK_ABORT("Invalid interpolation"); @@ -1205,20 +713,11 @@ diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp b/gfx/skia/skia/src/gp } void GrGLSLVaryingHandler::addVarying(const char* name, GrGLSLVarying* varying, - Interpolation interpolation) { - SkASSERT(GrSLTypeIsFloatType(varying->type()) || Interpolation::kMustBeFlat == interpolation); - bool willUseGeoShader = fProgramBuilder->primitiveProcessor().willUseGeoShader(); - VaryingInfo& v = fVaryings.push_back(); - -diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp ---- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp -+++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp -@@ -46,26 +46,28 @@ void GrGLSLVertexBuilder::onFinalize() { - static const char* input_type_name(GrGLSLGeometryBuilder::InputType in) { - using InputType = GrGLSLGeometryBuilder::InputType; - switch (in) { - case InputType::kPoints: return "points"; - case InputType::kLines: return "lines"; +Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp +@@ -51,6 +51,7 @@ static const char* input_type_name(GrGLS case InputType::kTriangles: return "triangles"; } SK_ABORT("invalid input type"); @@ -1226,10 +725,7 @@ diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp b/gfx/skia/sk } static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) { - using OutputType = GrGLSLGeometryBuilder::OutputType; - switch (out) { - case OutputType::kPoints: return "points"; - case OutputType::kLineStrip: return "line_strip"; +@@ -61,6 +62,7 @@ static const char* output_type_name(GrGL case OutputType::kTriangleStrip: return "triangle_strip"; } SK_ABORT("invalid output type"); @@ -1237,20 +733,11 @@ diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp b/gfx/skia/sk } void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType, int maxVertices, - int numInvocations) { - SkASSERT(!this->isConfigured()); - fNumInvocations = numInvocations; - this->addLayoutQualifier(input_type_name(inputType), kIn_InterfaceQualifier); - this->addLayoutQualifier(SkStringPrintf("invocations = %i", numInvocations).c_str(), -diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm ---- a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm -+++ b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm -@@ -501,16 +501,17 @@ size_t GrMtlCaps::GetFormatIndex(MTLPixe - static_assert(SK_ARRAY_COUNT(kMtlFormats) == GrMtlCaps::kNumMtlFormats, - "Size of kMtlFormats array must match static value in header"); - for (size_t i = 0; i < GrMtlCaps::kNumMtlFormats; ++i) { - if (kMtlFormats[i] == pixelFormat) { - return i; +Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm ++++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm +@@ -506,6 +506,7 @@ size_t GrMtlCaps::GetFormatIndex(MTLPixe } } SK_ABORT("Invalid MTLPixelFormat"); @@ -1258,17 +745,7 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm b/gfx/skia/skia/src/gpu/mtl/ } void GrMtlCaps::initFormatTable() { - FormatInfo* info; - - // Format: R8Unorm - { - info = &fFormatTable[GetFormatIndex(MTLPixelFormatR8Unorm)]; -@@ -1006,16 +1007,17 @@ GrBackendFormat GrMtlCaps::getBackendFor - case SkImage::kETC1_CompressionType: - #ifdef SK_BUILD_FOR_MAC - return {}; - #else - return GrBackendFormat::MakeMtl(MTLPixelFormatETC2_RGB8); +@@ -1011,6 +1012,7 @@ GrBackendFormat GrMtlCaps::getBackendFor #endif } SK_ABORT("Invalid compression type"); @@ -1276,20 +753,11 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm b/gfx/skia/skia/src/gpu/mtl/ } GrSwizzle GrMtlCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { - MTLPixelFormat mtlFormat = GrBackendFormatAsMTLPixelFormat(format); - SkASSERT(mtlFormat != MTLPixelFormatInvalid); - const auto& info = this->getFormatInfo(mtlFormat); - for (int i = 0; i < info.fColorTypeInfoCount; ++i) { - const auto& ctInfo = info.fColorTypeInfos[i]; -diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm ---- a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm -+++ b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm -@@ -150,16 +150,17 @@ static inline MTLVertexFormat attribute_ - return MTLVertexFormatUShortNormalized; - } else { - return MTLVertexFormatInvalid; - } - case kUShort4_norm_GrVertexAttribType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm ++++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm +@@ -155,6 +155,7 @@ static inline MTLVertexFormat attribute_ return MTLVertexFormatUShort4Normalized; } SK_ABORT("Unknown vertex attribute type"); @@ -1297,17 +765,7 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/gfx/skia/s } static MTLVertexDescriptor* create_vertex_descriptor(const GrPrimitiveProcessor& primProc) { - uint32_t vertexBinding = 0, instanceBinding = 0; - - int nextBinding = GrMtlUniformHandler::kLastUniformBinding + 1; - if (primProc.hasVertexAttributes()) { - vertexBinding = nextBinding++; -@@ -271,16 +272,17 @@ static MTLBlendFactor blend_coeff_to_mtl - } else { - return MTLBlendFactorZero; - } - case kIllegal_GrBlendCoeff: - return MTLBlendFactorZero; +@@ -276,6 +277,7 @@ static MTLBlendFactor blend_coeff_to_mtl } SK_ABORT("Unknown blend coefficient"); @@ -1315,20 +773,11 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/gfx/skia/s } static MTLBlendOperation blend_equation_to_mtl_blend_op(GrBlendEquation equation) { - static const MTLBlendOperation gTable[] = { - MTLBlendOperationAdd, // kAdd_GrBlendEquation - MTLBlendOperationSubtract, // kSubtract_GrBlendEquation - MTLBlendOperationReverseSubtract, // kReverseSubtract_GrBlendEquation - }; -diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm ---- a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm -+++ b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm -@@ -33,16 +33,17 @@ static inline MTLSamplerAddressMode wrap - } else - #endif - { - SkASSERT(false); - return MTLSamplerAddressModeClampToEdge; +Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm ++++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm +@@ -38,6 +38,7 @@ static inline MTLSamplerAddressMode wrap } } SK_ABORT("Unknown wrap mode."); @@ -1336,20 +785,11 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm b/gfx/skia/skia/src/gpu/m } GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState) { - static MTLSamplerMinMagFilter mtlMinMagFilterModes[] = { - MTLSamplerMinMagFilterNearest, - MTLSamplerMinMagFilterLinear, - MTLSamplerMinMagFilterLinear - }; -diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm ---- a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm -+++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm -@@ -85,16 +85,17 @@ static uint32_t grsltype_to_alignment_ma - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kSampler_GrSLType: - case kTexture2D_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm ++++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm +@@ -90,6 +90,7 @@ static uint32_t grsltype_to_alignment_ma break; } SK_ABORT("Unexpected type"); @@ -1357,17 +797,7 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm b/gfx/skia/skia/sr } /** Returns the size in bytes taken up in Metal buffers for GrSLTypes. */ - static inline uint32_t grsltype_to_mtl_size(GrSLType type) { - switch(type) { - case kByte_GrSLType: - return sizeof(int8_t); - case kByte2_GrSLType: -@@ -167,16 +168,17 @@ static inline uint32_t grsltype_to_mtl_s - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kSampler_GrSLType: - case kTexture2D_GrSLType: +@@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_mtl_s break; } SK_ABORT("Unexpected type"); @@ -1375,20 +805,11 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm b/gfx/skia/skia/sr } // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add - // taking into consideration all alignment requirements. The uniformOffset is set to the offset for - // the new uniform, and currentOffset is updated to be the offset to the end of the new uniform. - static void get_ubo_aligned_offset(uint32_t* uniformOffset, - uint32_t* currentOffset, - uint32_t* maxAlignment, -diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm ---- a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm -+++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm -@@ -107,16 +107,17 @@ bool GrPixelConfigToMTLFormat(GrPixelCon - case kRGBA_16161616_GrPixelConfig: - *format = MTLPixelFormatRGBA16Unorm; - return true; - case kRG_half_GrPixelConfig: - *format = MTLPixelFormatRG16Float; +Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm ++++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm +@@ -112,6 +112,7 @@ bool GrPixelConfigToMTLFormat(GrPixelCon return true; } SK_ABORT("Unexpected config"); @@ -1396,20 +817,11 @@ diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm b/gfx/skia/skia/src/gpu/mtl/ } MTLTextureDescriptor* GrGetMTLTextureDescriptor(id mtlTexture) { - MTLTextureDescriptor* texDesc = [[MTLTextureDescriptor alloc] init]; - texDesc.textureType = mtlTexture.textureType; - texDesc.pixelFormat = mtlTexture.pixelFormat; - texDesc.width = mtlTexture.width; - texDesc.height = mtlTexture.height; -diff --git a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp ---- a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp -+++ b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp -@@ -605,16 +605,17 @@ static uint32_t seed_vertices(GrPrimitiv - case GrPrimitiveType::kLines: - case GrPrimitiveType::kLineStrip: - return 2; - case GrPrimitiveType::kPath: - SkASSERT(0); +Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp +@@ -610,6 +610,7 @@ static uint32_t seed_vertices(GrPrimitiv return 0; } SK_ABORT("Incomplete switch\n"); @@ -1417,17 +829,7 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/gfx/skia/skia/src/ } static uint32_t primitive_vertices(GrPrimitiveType type) { - switch (type) { - case GrPrimitiveType::kTriangles: - return 3; - case GrPrimitiveType::kLines: - return 2; -@@ -622,16 +623,17 @@ static uint32_t primitive_vertices(GrPri - case GrPrimitiveType::kPoints: - case GrPrimitiveType::kLineStrip: - return 1; - case GrPrimitiveType::kPath: - SkASSERT(0); +@@ -627,6 +628,7 @@ static uint32_t primitive_vertices(GrPri return 0; } SK_ABORT("Incomplete switch\n"); @@ -1435,34 +837,21 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/gfx/skia/skia/src/ } static SkPoint random_point(SkRandom* random, SkScalar min, SkScalar max) { - SkPoint p; - p.fX = random->nextRangeScalar(min, max); - p.fY = random->nextRangeScalar(min, max); - return p; - } -diff --git a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp ---- a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp -+++ b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp -@@ -818,9 +818,10 @@ static bool can_use_hw_derivatives_with_ - if (!can_use_hw_derivatives_with_coverage(devScale, rrect.radii(corner))) { - return false; - } - } - return true; +Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp +@@ -823,4 +823,5 @@ static bool can_use_hw_derivatives_with_ } } SK_ABORT("Invalid round rect type."); + SkUNREACHABLE; } -diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp ---- a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp -+++ b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp -@@ -2278,39 +2278,42 @@ static int rrect_type_to_vert_count(RRec - switch (type) { - case kFill_RRectType: - case kStroke_RRectType: - return kVertsPerStandardRRect; - case kOverstroke_RRectType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp +@@ -2283,6 +2283,7 @@ static int rrect_type_to_vert_count(RRec return kVertsPerOverstrokeRRect; } SK_ABORT("Invalid type"); @@ -1470,12 +859,7 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/g } static int rrect_type_to_index_count(RRectType type) { - switch (type) { - case kFill_RRectType: - return kIndicesPerFillRRect; - case kStroke_RRectType: - return kIndicesPerStrokeRRect; - case kOverstroke_RRectType: +@@ -2295,6 +2296,7 @@ static int rrect_type_to_index_count(RRe return kIndicesPerOverstrokeRRect; } SK_ABORT("Invalid type"); @@ -1483,11 +867,7 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/g } static const uint16_t* rrect_type_to_indices(RRectType type) { - switch (type) { - case kFill_RRectType: - case kStroke_RRectType: - return gStandardRRectIndices; - case kOverstroke_RRectType: +@@ -2306,6 +2308,7 @@ static const uint16_t* rrect_type_to_ind return gOverstrokeRRectIndices; } SK_ABORT("Invalid type"); @@ -1495,20 +875,11 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/g } /////////////////////////////////////////////////////////////////////////////////////////////////// - - // For distance computations in the interior of filled rrects we: - // - // add a interior degenerate (point or line) rect - // each vertex of that rect gets -outerRad as its radius -diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp ---- a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp -+++ b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp -@@ -150,39 +150,42 @@ static int rrect_type_to_vert_count(RRec - case kFill_RRectType: - return kVertsPerFillRRect; - case kStroke_RRectType: - return kVertsPerStrokeRRect; - case kOverstroke_RRectType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp +@@ -155,6 +155,7 @@ static int rrect_type_to_vert_count(RRec return kVertsPerOverstrokeRRect; } SK_ABORT("Invalid type"); @@ -1516,12 +887,7 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/g } static int rrect_type_to_index_count(RRectType type) { - switch (type) { - case kFill_RRectType: - return kIndicesPerFillRRect; - case kStroke_RRectType: - return kIndicesPerStrokeRRect; - case kOverstroke_RRectType: +@@ -167,6 +168,7 @@ static int rrect_type_to_index_count(RRe return kIndicesPerOverstrokeRRect; } SK_ABORT("Invalid type"); @@ -1529,11 +895,7 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/g } static const uint16_t* rrect_type_to_indices(RRectType type) { - switch (type) { - case kFill_RRectType: - case kStroke_RRectType: - return gRRectIndices + 6*4; - case kOverstroke_RRectType: +@@ -178,6 +180,7 @@ static const uint16_t* rrect_type_to_ind return gRRectIndices; } SK_ABORT("Invalid type"); @@ -1541,20 +903,11 @@ diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/g } /////////////////////////////////////////////////////////////////////////////// - namespace { - - class ShadowCircularRRectOp final : public GrMeshDrawOp { - public: - DEFINE_OP_CLASS_ID -diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlob.h b/gfx/skia/skia/src/gpu/text/GrTextBlob.h ---- a/gfx/skia/skia/src/gpu/text/GrTextBlob.h -+++ b/gfx/skia/skia/src/gpu/text/GrTextBlob.h -@@ -120,16 +120,17 @@ public: - } - - void operator delete(void* p) { - ::operator delete(p); - } +Index: firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlob.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/text/GrTextBlob.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlob.h +@@ -125,6 +125,7 @@ public: void* operator new(size_t) { SK_ABORT("All blobs are created by placement new."); @@ -1562,34 +915,21 @@ diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlob.h b/gfx/skia/skia/src/gpu/tex } void* operator new(size_t, void* p) { return p; } - - bool hasDistanceField() const { return SkToBool(fTextType & kHasDistanceField_TextType); } - bool hasBitmap() const { return SkToBool(fTextType & kHasBitmap_TextType); } - void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } - void setHasBitmap() { fTextType |= kHasBitmap_TextType; } -diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp ---- a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp -+++ b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp -@@ -279,9 +279,10 @@ bool GrTextBlob::VertexRegenerator::rege - // set use tokens for all of the glyphs in our subrun. This is only valid if we - // have a valid atlas generation - fFullAtlasManager->setUseTokenBulk(*fSubRun->bulkUseToken(), - fUploadTarget->tokenTracker()->nextDrawToken(), - fSubRun->maskFormat()); +Index: firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp +@@ -284,4 +284,5 @@ bool GrTextBlob::VertexRegenerator::rege return true; } SK_ABORT("Should not get here"); + SkUNREACHABLE; } -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp -@@ -103,16 +103,17 @@ static FormatCompatibilityClass format_c - case VK_FORMAT_R8G8B8_UNORM: - return FormatCompatibilityClass::k24_3_1; - - case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: - return FormatCompatibilityClass::kETC2_RGB_8_16; +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp +@@ -108,6 +108,7 @@ static FormatCompatibilityClass format_c default: SK_ABORT("Unsupported VkFormat"); @@ -1597,17 +937,7 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp b/gfx/skia/skia/src/gpu/vk/Gr } } - bool GrVkCaps::canCopyImage(VkFormat dstFormat, int dstSampleCnt, bool dstHasYcbcr, - VkFormat srcFormat, int srcSampleCnt, bool srcHasYcbcr) const { - if ((dstSampleCnt > 1 || srcSampleCnt > 1) && dstSampleCnt != srcSampleCnt) { - return false; - } -@@ -1651,16 +1652,17 @@ GrBackendFormat GrVkCaps::onGetDefaultBa - - GrBackendFormat GrVkCaps::getBackendFormatFromCompressionType( - SkImage::CompressionType compressionType) const { - switch (compressionType) { - case SkImage::kETC1_CompressionType: +@@ -1656,6 +1657,7 @@ GrBackendFormat GrVkCaps::getBackendForm return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK); } SK_ABORT("Invalid compression type"); @@ -1615,20 +945,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp b/gfx/skia/skia/src/gpu/vk/Gr } GrSwizzle GrVkCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { - VkFormat vkFormat; - SkAssertResult(format.asVkFormat(&vkFormat)); - const auto& info = this->getFormatInfo(vkFormat); - for (int i = 0; i < info.fColorTypeInfoCount; ++i) { - const auto& ctInfo = info.fColorTypeInfos[i]; -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp -@@ -23,16 +23,17 @@ static BufferUsage get_buffer_usage(GrVk - case GrVkBuffer::kUniform_Type: - SkASSERT(dynamic); - return BufferUsage::kCpuWritesGpuReads; - case GrVkBuffer::kCopyRead_Type: // fall through - case GrVkBuffer::kCopyWrite_Type: +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp +@@ -28,6 +28,7 @@ static BufferUsage get_buffer_usage(GrVk return BufferUsage::kCpuOnly; } SK_ABORT("Invalid GrVkBuffer::Type"); @@ -1636,20 +957,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp b/gfx/skia/skia/src/gpu/vk/ } bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu, - VkBuffer buffer, - GrVkBuffer::Type type, - bool dynamic, - GrVkAlloc* alloc) { - GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp -@@ -75,16 +75,17 @@ static inline VkFormat attrib_type_to_vk - case kUint_GrVertexAttribType: - return VK_FORMAT_R32_UINT; - case kUShort_norm_GrVertexAttribType: - return VK_FORMAT_R16_UNORM; - case kUShort4_norm_GrVertexAttribType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp +@@ -80,6 +80,7 @@ static inline VkFormat attrib_type_to_vk return VK_FORMAT_R16G16B16A16_UNORM; } SK_ABORT("Unknown vertex attrib type"); @@ -1657,17 +969,7 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp b/gfx/skia/skia/src/gpu/v } static void setup_vertex_input_state(const GrPrimitiveProcessor& primProc, - VkPipelineVertexInputStateCreateInfo* vertexInputInfo, - SkSTArray<2, VkVertexInputBindingDescription, true>* bindingDescs, - VkVertexInputAttributeDescription* attributeDesc) { - uint32_t vertexBinding = 0, instanceBinding = 0; - -@@ -157,18 +158,20 @@ static VkPrimitiveTopology gr_primitive_ - case GrPrimitiveType::kPoints: - return VK_PRIMITIVE_TOPOLOGY_POINT_LIST; - case GrPrimitiveType::kLines: - return VK_PRIMITIVE_TOPOLOGY_LINE_LIST; - case GrPrimitiveType::kLineStrip: +@@ -162,8 +163,10 @@ static VkPrimitiveTopology gr_primitive_ return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; case GrPrimitiveType::kPath: SK_ABORT("Unsupported primitive type"); @@ -1678,20 +980,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp b/gfx/skia/skia/src/gpu/v } static void setup_input_assembly_state(GrPrimitiveType primitiveType, - VkPipelineInputAssemblyStateCreateInfo* inputAssemblyInfo) { - memset(inputAssemblyInfo, 0, sizeof(VkPipelineInputAssemblyStateCreateInfo)); - inputAssemblyInfo->sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - inputAssemblyInfo->pNext = nullptr; - inputAssemblyInfo->flags = 0; -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp -@@ -18,16 +18,17 @@ static inline VkSamplerAddressMode wrap_ - case GrSamplerState::WrapMode::kRepeat: - return VK_SAMPLER_ADDRESS_MODE_REPEAT; - case GrSamplerState::WrapMode::kMirrorRepeat: - return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT; - case GrSamplerState::WrapMode::kClampToBorder: +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp +@@ -23,6 +23,7 @@ static inline VkSamplerAddressMode wrap_ return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; } SK_ABORT("Unknown wrap mode."); @@ -1699,20 +992,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp b/gfx/skia/skia/src/gpu/vk } GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, const GrSamplerState& samplerState, - const GrVkYcbcrConversionInfo& ycbcrInfo) { - static VkFilter vkMinFilterModes[] = { - VK_FILTER_NEAREST, - VK_FILTER_LINEAR, - VK_FILTER_LINEAR -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h ---- a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h -+++ b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h -@@ -29,16 +29,17 @@ private: - const SkString& dumpName) const override; - - void onMap() override { this->GrGpuBuffer::fMapPtr = this->vkMap(this->getVkGpu()); } - - void onUnmap() override { this->vkUnmap(this->getVkGpu()); } +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h +@@ -34,6 +34,7 @@ private: bool onUpdateData(const void* src, size_t srcSizeInBytes) override { SK_ABORT("Not implemented for transfer buffers."); @@ -1720,20 +1004,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h b/gfx/skia/skia/src/g } GrVkGpu* getVkGpu() const { - SkASSERT(!this->wasDestroyed()); - return reinterpret_cast(this->getGpu()); - } - - typedef GrGpuBuffer INHERITED; -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp -@@ -84,16 +84,17 @@ static uint32_t grsltype_to_alignment_ma - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kSampler_GrSLType: - case kTexture2D_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp +@@ -89,6 +89,7 @@ static uint32_t grsltype_to_alignment_ma break; } SK_ABORT("Unexpected type"); @@ -1741,17 +1016,7 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp b/gfx/skia/skia/src } /** Returns the size in bytes taken up in vulkanbuffers for GrSLTypes. */ - static inline uint32_t grsltype_to_vk_size(GrSLType type) { - switch(type) { - case kByte_GrSLType: - return sizeof(int8_t); - case kByte2_GrSLType: -@@ -167,16 +168,17 @@ static inline uint32_t grsltype_to_vk_si - case kTexture2DSampler_GrSLType: - case kTextureExternalSampler_GrSLType: - case kTexture2DRectSampler_GrSLType: - case kSampler_GrSLType: - case kTexture2D_GrSLType: +@@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_vk_si break; } SK_ABORT("Unexpected type"); @@ -1759,20 +1024,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp b/gfx/skia/skia/src } - // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add - // taking into consideration all alignment requirements. The uniformOffset is set to the offset for - // the new uniform, and currentOffset is updated to be the offset to the end of the new uniform. - static void get_ubo_aligned_offset(uint32_t* uniformOffset, - uint32_t* currentOffset, -diff --git a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp ---- a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp -+++ b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp -@@ -69,16 +69,17 @@ static inline int grsltype_to_location_s - case kByte_GrSLType: - return 1; - case kUint_GrSLType: // fall through - case kUShort_GrSLType: - case kUByte_GrSLType: +Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp ++++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp +@@ -74,6 +74,7 @@ static inline int grsltype_to_location_s return 1; } SK_ABORT("Unexpected type"); @@ -1780,20 +1036,11 @@ diff --git a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp b/gfx/skia/skia/src } static void finalize_helper(GrVkVaryingHandler::VarArray& vars) { - int locationIndex = 0; - for (int i = 0; i < vars.count(); ++i) { - GrShaderVar& var = vars[i]; - SkString location; - location.appendf("location = %d", locationIndex); -diff --git a/gfx/skia/skia/src/pdf/SkPDFTag.cpp b/gfx/skia/skia/src/pdf/SkPDFTag.cpp ---- a/gfx/skia/skia/src/pdf/SkPDFTag.cpp -+++ b/gfx/skia/skia/src/pdf/SkPDFTag.cpp -@@ -59,16 +59,17 @@ static const char* tag_name_from_type(Sk - M(WT); - M(WP); - M(Figure); - M(Formula); - M(Form); +Index: firefox-102.0/gfx/skia/skia/src/pdf/SkPDFTag.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/pdf/SkPDFTag.cpp ++++ firefox-102.0/gfx/skia/skia/src/pdf/SkPDFTag.cpp +@@ -64,6 +64,7 @@ static const char* tag_name_from_type(Sk #undef M } SK_ABORT("bad tag"); @@ -1801,20 +1048,11 @@ diff --git a/gfx/skia/skia/src/pdf/SkPDFTag.cpp b/gfx/skia/skia/src/pdf/SkPDFTag } struct SkPDFTagNode { - SkPDFTagNode* fChildren = nullptr; - size_t fChildCount = 0; - struct MarkedContentInfo { - unsigned fPageIndex; - int fMarkId; -diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp ---- a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp -+++ b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp -@@ -168,28 +168,32 @@ public: - SkFontMgr_FCI(sk_sp fci) - : fFCI(std::move(fci)) - , fCache(kMaxSize) - {} - +Index: firefox-102.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp ++++ firefox-102.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp +@@ -173,18 +173,22 @@ public: protected: int onCountFamilies() const override { SK_ABORT("Not implemented."); @@ -1837,17 +1075,7 @@ diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/ski } SkTypeface* onMatchFamilyStyle(const char requestedFamilyName[], - const SkFontStyle& requestedStyle) const override - { - SkAutoMutexExclusive ama(fMutex); - - SkFontConfigInterface::FontIdentity identity; -@@ -210,20 +214,22 @@ protected: - } - return face.release(); - } - - SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, +@@ -215,10 +219,12 @@ protected: const char* bcp47[], int bcp47Count, SkUnichar character) const override { SK_ABORT("Not implemented."); @@ -1860,20 +1088,11 @@ diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/ski } sk_sp onMakeFromData(sk_sp data, int ttcIndex) const override { - return this->onMakeFromStreamIndex(SkMemoryStream::Make(std::move(data)), ttcIndex); - } - - sk_sp onMakeFromStreamIndex(std::unique_ptr stream, - int ttcIndex) const override { -diff --git a/gfx/skia/skia/src/shaders/SkImageShader.cpp b/gfx/skia/skia/src/shaders/SkImageShader.cpp ---- a/gfx/skia/skia/src/shaders/SkImageShader.cpp -+++ b/gfx/skia/skia/src/shaders/SkImageShader.cpp -@@ -178,16 +178,17 @@ static GrSamplerState::WrapMode tile_mod - case SkTileMode::kRepeat: - return GrSamplerState::WrapMode::kRepeat; - case SkTileMode::kMirror: - return GrSamplerState::WrapMode::kMirrorRepeat; - case SkTileMode::kDecal: +Index: firefox-102.0/gfx/skia/skia/src/shaders/SkImageShader.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/shaders/SkImageShader.cpp ++++ firefox-102.0/gfx/skia/skia/src/shaders/SkImageShader.cpp +@@ -183,6 +183,7 @@ static GrSamplerState::WrapMode tile_mod return GrSamplerState::WrapMode::kClampToBorder; } SK_ABORT("Unknown tile mode."); @@ -1881,20 +1100,11 @@ diff --git a/gfx/skia/skia/src/shaders/SkImageShader.cpp b/gfx/skia/skia/src/sha } std::unique_ptr SkImageShader::asFragmentProcessor( - const GrFPArgs& args) const { - const auto lm = this->totalLocalMatrix(args.fPreLocalMatrix, args.fPostLocalMatrix); - SkMatrix lmInverse; - if (!lm->invert(&lmInverse)) { - return nullptr; -diff --git a/gfx/skia/skia/src/utils/SkShadowUtils.cpp b/gfx/skia/skia/src/utils/SkShadowUtils.cpp ---- a/gfx/skia/skia/src/utils/SkShadowUtils.cpp -+++ b/gfx/skia/skia/src/utils/SkShadowUtils.cpp -@@ -144,16 +144,17 @@ struct SpotVerticesFactory { - // if the offsets don't match. - if (fOffset == that.fOffset) { - translate->set(0, 0); - return true; - } +Index: firefox-102.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp +=================================================================== +--- firefox-102.0.orig/gfx/skia/skia/src/utils/SkShadowUtils.cpp ++++ firefox-102.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp +@@ -149,6 +149,7 @@ struct SpotVerticesFactory { return false; } SK_ABORT("Uninitialized occluder type?"); @@ -1902,20 +1112,328 @@ diff --git a/gfx/skia/skia/src/utils/SkShadowUtils.cpp b/gfx/skia/skia/src/utils } sk_sp makeVertices(const SkPath& path, const SkMatrix& ctm, - SkVector* translate) const { - bool transparent = OccluderType::kTransparent == fOccluderType; - SkPoint3 zParams = SkPoint3::Make(0, 0, fOccluderHeight); - if (ctm.hasPerspective() || OccluderType::kOpaquePartialUmbra == fOccluderType) { - translate->set(0, 0); -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp ---- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp -+++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp -@@ -2646,16 +2646,17 @@ get_type_name_for_precision_qualifier(co - unreachable("Unsupported sampler/image type"); - } /* sampler/image type */ - break; - } /* GLSL_TYPE_SAMPLER/GLSL_TYPE_IMAGE */ - break; +Index: firefox-102.0/intl/icu/source/i18n/number_rounding.cpp +=================================================================== +--- firefox-102.0.orig/intl/icu/source/i18n/number_rounding.cpp ++++ firefox-102.0/intl/icu/source/i18n/number_rounding.cpp +@@ -283,6 +283,7 @@ FractionPrecision Precision::constructFr + settings.fMaxFrac = static_cast(maxFrac); + settings.fMinSig = -1; + settings.fMaxSig = -1; ++ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; + PrecisionUnion union_; + union_.fracSig = settings; + return {RND_FRACTION, union_}; +@@ -294,6 +295,7 @@ Precision Precision::constructSignifican + settings.fMaxFrac = -1; + settings.fMinSig = static_cast(minSig); + settings.fMaxSig = static_cast(maxSig); ++ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; + PrecisionUnion union_; + union_.fracSig = settings; + return {RND_SIGNIFICANT, union_}; +Index: firefox-102.0/third_party/libwebrtc/api/adaptation/resource.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/api/adaptation/resource.cc ++++ firefox-102.0/third_party/libwebrtc/api/adaptation/resource.cc +@@ -9,6 +9,7 @@ + */ + + #include "api/adaptation/resource.h" ++#include "rtc_base/checks.h" + + namespace webrtc { + +@@ -18,6 +19,9 @@ const char* ResourceUsageStateToString(R + return "kOveruse"; + case ResourceUsageState::kUnderuse: + return "kUnderuse"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/libwebrtc/api/rtp_parameters.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/api/rtp_parameters.cc ++++ firefox-102.0/third_party/libwebrtc/api/rtp_parameters.cc +@@ -29,6 +29,9 @@ const char* DegradationPreferenceToStrin + return "maintain-resolution"; + case DegradationPreference::BALANCED: + return "balanced"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/libwebrtc/api/video_codecs/video_codec.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/video_codec.cc ++++ firefox-102.0/third_party/libwebrtc/api/video_codecs/video_codec.cc +@@ -119,6 +119,9 @@ const char* CodecTypeToPayloadString(Vid + return kPayloadNameMultiplex; + case kVideoCodecGeneric: + return kPayloadNameGeneric; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc ++++ firefox-102.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc +@@ -161,6 +161,9 @@ class VideoEncoderSoftwareFallbackWrappe + case EncoderState::kFallbackDueToFailure: + case EncoderState::kForcedFallback: + return fallback_encoder_.get(); ++ default: ++ RTC_NOTREACHED(); ++ return nullptr; + } + } + +@@ -339,6 +342,9 @@ int32_t VideoEncoderSoftwareFallbackWrap + case EncoderState::kFallbackDueToFailure: + case EncoderState::kForcedFallback: + return fallback_encoder_->Encode(frame, frame_types); ++ default: ++ RTC_NOTREACHED(); ++ return WEBRTC_VIDEO_CODEC_ERROR; + } + } + int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( +Index: firefox-102.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc ++++ firefox-102.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc +@@ -161,6 +161,9 @@ const char* Adaptation::StatusToString(A + return "kAdaptationDisabled"; + case Status::kRejectedByConstraint: + return "kRejectedByConstraint"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +@@ -380,6 +383,9 @@ VideoStreamAdapter::RestrictionsOrState + } + case DegradationPreference::DISABLED: + return Adaptation::Status::kAdaptationDisabled; ++ default: ++ RTC_NOTREACHED(); ++ return Adaptation::Status::kAdaptationDisabled; + } + } + +@@ -459,6 +465,9 @@ VideoStreamAdapter::GetAdaptationDownSte + } + case DegradationPreference::DISABLED: + return Adaptation::Status::kAdaptationDisabled; ++ default: ++ RTC_NOTREACHED(); ++ return Adaptation::Status::kAdaptationDisabled; + } + } + +@@ -599,6 +608,8 @@ Adaptation VideoStreamAdapter::GetAdaptD + } + default: + RTC_NOTREACHED(); ++ return RestrictionsOrStateToAdaptation( ++ Adaptation::Status::kAdaptationDisabled, input_state); + } + } + +Index: firefox-102.0/third_party/libwebrtc/call/simulated_network.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/call/simulated_network.cc ++++ firefox-102.0/third_party/libwebrtc/call/simulated_network.cc +@@ -77,6 +77,8 @@ bool CoDelSimulation::DropDequeuedPacket + } + return false; + } ++ RTC_NOTREACHED(); ++ return false; + } + + SimulatedNetwork::SimulatedNetwork(Config config, uint64_t random_seed) +Index: firefox-102.0/third_party/libwebrtc/call/video_send_stream.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/call/video_send_stream.cc ++++ firefox-102.0/third_party/libwebrtc/call/video_send_stream.cc +@@ -27,6 +27,9 @@ const char* StreamTypeToString(VideoSend + return "rtx"; + case VideoSendStream::StreamStats::StreamType::kFlexfec: + return "flexfec"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc ++++ firefox-102.0/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc +@@ -352,7 +352,7 @@ NetEq::Operation DecisionLogic::FuturePa + prev_mode == NetEq::Mode::kCodecInternalCng) { + size_t cur_size_samples = + estimate_dtx_delay_ +- ? cur_size_samples = span_samples_in_packet_buffer ++ ? span_samples_in_packet_buffer + : num_packets_in_packet_buffer * decoder_frame_length; + // Target level is in number of packets in Q8. + const size_t target_level_samples = +Index: firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc ++++ firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc +@@ -113,6 +113,9 @@ GainControl::Mode Agc1ConfigModeToInterf + return GainControl::kAdaptiveDigital; + case Agc1Config::kFixedDigital: + return GainControl::kFixedDigital; ++ default: ++ RTC_NOTREACHED(); ++ return GainControl::kAdaptiveAnalog; + } + } + +@@ -1852,6 +1855,7 @@ void AudioProcessingImpl::InitializeNois + return NsConfig::SuppressionLevel::k21dB; + default: + RTC_NOTREACHED(); ++ return NsConfig::SuppressionLevel::k6dB; + } + }; + +Index: firefox-102.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc ++++ firefox-102.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc +@@ -27,6 +27,9 @@ std::string NoiseSuppressionLevelToStrin + return "High"; + case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: + return "VeryHigh"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +@@ -39,6 +42,9 @@ std::string GainController1ModeToString( + return "AdaptiveDigital"; + case AudioProcessing::Config::GainController1::Mode::kFixedDigital: + return "FixedDigital"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +@@ -49,6 +55,9 @@ std::string GainController2LevelEstimato + return "Rms"; + case AudioProcessing::Config::GainController2::LevelEstimator::kPeak: + return "Peak"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/libwebrtc/modules/pacing/pacing_controller.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/pacing/pacing_controller.cc ++++ firefox-102.0/third_party/libwebrtc/modules/pacing/pacing_controller.cc +@@ -83,6 +83,9 @@ int GetPriorityForType(RtpPacketMediaTyp + // Packets that are in themselves likely useless, only sent to keep the + // BWE high. + return kFirstPriority + 4; ++ default: ++ RTC_NOTREACHED(); ++ return -1; + } + } + +Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc ++++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc +@@ -36,6 +36,9 @@ std::unique_ptr Cr + case kVideoCodecGeneric: + case kVideoCodecMultiplex: + return std::make_unique(); ++ default: ++ RTC_NOTREACHED(); ++ return nullptr; + } + } + +Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc ++++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc +@@ -130,6 +130,9 @@ bool IsNonVolatile(RTPExtensionType type + // TODO: Mozilla implement for CsrcAudioLevel + RTC_CHECK(false); + return false; ++ default: ++ RTC_NOTREACHED(); ++ return false; + } + } + +Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc ++++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +@@ -45,6 +45,9 @@ const char* FrameTypeToString(AudioFrame + return "audio_speech"; + case AudioFrameType::kAudioFrameCN: + return "audio_cn"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + #endif +Index: firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc ++++ firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc +@@ -28,6 +28,9 @@ TemporalLayersChecker::CreateTemporalLay + case Vp8TemporalLayersType::kBitrateDynamic: + // Conference mode temporal layering for screen content in base stream. + return std::make_unique(num_temporal_layers); ++ default: ++ RTC_NOTREACHED(); ++ return nullptr; + } + } + +Index: firefox-102.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc +=================================================================== +--- firefox-102.0.orig/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc ++++ firefox-102.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc +@@ -54,6 +54,9 @@ std::string ToString(VideoAdaptationReas + return "quality"; + case VideoAdaptationReason::kCpu: + return "cpu"; ++ default: ++ RTC_NOTREACHED(); ++ return ""; + } + } + +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp +@@ -2651,6 +2651,7 @@ get_type_name_for_precision_qualifier(co default: unreachable("Unsupported type"); } /* base type */ @@ -1923,20 +1441,11 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hi } static unsigned - select_gles_precision(unsigned qual_precision, - const glsl_type *type, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) - { - /* Precision qualifiers do not have any meaning in Desktop GLSL. -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp ---- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp -+++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp -@@ -619,16 +619,17 @@ ir_expression::get_num_operands(ir_expre - - if (op <= ir_last_triop) - return 3; - - if (op <= ir_last_quadop) +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp +@@ -624,6 +624,7 @@ ir_expression::get_num_operands(ir_expre return 4; unreachable("Could not calculate number of operands"); @@ -1944,20 +1453,11 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp b/ } #include "ir_expression_operation_strings.h" - - const char* - depth_layout_string(ir_depth_layout layout) - { - switch(layout) { -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp ---- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp -+++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp -@@ -234,16 +234,17 @@ incremented_before_terminator(ir_loop *l - } - - default: - break; - } +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp +@@ -239,6 +239,7 @@ incremented_before_terminator(ir_loop *l } unreachable("Unable to find induction variable"); @@ -1965,20 +1465,11 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_anal } /** - * Record the fact that the given loop variable was referenced inside the loop. - * - * \arg in_assignee is true if the reference was on the LHS of an assignment. - * - * \arg in_conditional_code_or_nested_loop is true if the reference occurred -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp ---- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp -+++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp -@@ -224,16 +224,17 @@ write_mask_to_swizzle(unsigned write_mas - { - switch (write_mask) { - case WRITEMASK_X: return SWIZZLE_X; - case WRITEMASK_Y: return SWIZZLE_Y; - case WRITEMASK_Z: return SWIZZLE_Z; +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp +@@ -229,6 +229,7 @@ write_mask_to_swizzle(unsigned write_mas case WRITEMASK_W: return SWIZZLE_W; } unreachable("not reached"); @@ -1986,20 +1477,11 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vecto } /** - * Returns whether a single-channeled write mask matches a swizzle. - */ - static bool - write_mask_matches_swizzle(unsigned write_mask, - const ir_swizzle *swz) -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp ---- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp -+++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp -@@ -455,16 +455,17 @@ const glsl_type *glsl_type::get_bare_typ - case GLSL_TYPE_VOID: - case GLSL_TYPE_SUBROUTINE: - case GLSL_TYPE_FUNCTION: - case GLSL_TYPE_ERROR: - return this; +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp +@@ -460,6 +460,7 @@ const glsl_type *glsl_type::get_bare_typ } unreachable("Invalid base type"); @@ -2007,17 +1489,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp } const glsl_type *glsl_type::get_float16_type() const - { - assert(this->base_type == GLSL_TYPE_FLOAT); - - return get_instance(GLSL_TYPE_FLOAT16, - this->vector_elements, -@@ -2011,16 +2012,17 @@ glsl_type::get_explicit_std140_type(bool - (enum glsl_interface_packing)this->interface_packing, - this->interface_row_major, - this->name); - - delete[] fields; +@@ -2016,6 +2017,7 @@ glsl_type::get_explicit_std140_type(bool return type; } else { unreachable("Invalid type for UBO or SSBO"); @@ -2025,17 +1497,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp } } - unsigned - glsl_type::std430_base_alignment(bool row_major) const - { - - unsigned N = is_64bit() ? 8 : 4; -@@ -2369,16 +2371,17 @@ glsl_type::get_explicit_std430_type(bool - (enum glsl_interface_packing)this->interface_packing, - this->interface_row_major, - this->name); - - delete[] fields; +@@ -2374,6 +2376,7 @@ glsl_type::get_explicit_std430_type(bool return type; } else { unreachable("Invalid type for SSBO"); @@ -2043,17 +1505,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp } } - const glsl_type * - glsl_type::get_explicit_interface_type(bool supports_std430) const - { - enum glsl_interface_packing packing = - this->get_internal_ifc_packing(supports_std430); -@@ -2443,16 +2446,17 @@ glsl_type::get_explicit_type_for_size_al - unsigned stride = align(col_size, col_align); - - *size = this->matrix_columns * stride; - *alignment = col_align; - return glsl_type::get_instance(this->base_type, this->vector_elements, +@@ -2448,6 +2451,7 @@ glsl_type::get_explicit_type_for_size_al this->matrix_columns, stride, false); } else { unreachable("Unhandled type."); @@ -2061,17 +1513,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp } } - unsigned - glsl_type::count_vec4_slots(bool is_gl_vertex_input, bool is_bindless) const - { - /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec: - * -@@ -2943,12 +2947,13 @@ glsl_get_sampler_dim_coordinate_componen - case GLSL_SAMPLER_DIM_SUBPASS: - case GLSL_SAMPLER_DIM_SUBPASS_MS: - return 2; - case GLSL_SAMPLER_DIM_3D: - case GLSL_SAMPLER_DIM_CUBE: +@@ -2948,6 +2952,7 @@ glsl_get_sampler_dim_coordinate_componen return 3; default: unreachable("Unknown sampler dim"); @@ -2079,16 +1521,11 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp } } - } -diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h ---- a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h -+++ b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h -@@ -180,16 +180,17 @@ static inline gl_shader_stage - case GL_COMPUTE_SUBROUTINE_UNIFORM: - return MESA_SHADER_COMPUTE; - case GL_TESS_CONTROL_SUBROUTINE_UNIFORM: - return MESA_SHADER_TESS_CTRL; - case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM: +Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h +=================================================================== +--- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h ++++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h +@@ -185,6 +185,7 @@ _mesa_shader_stage_from_subroutine_unifo return MESA_SHADER_TESS_EVAL; } unreachable("not reached"); @@ -2096,17 +1533,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b } static inline gl_shader_stage - _mesa_shader_stage_from_subroutine(GLenum subroutine) - { - switch (subroutine) { - case GL_VERTEX_SUBROUTINE: - return MESA_SHADER_VERTEX; -@@ -200,16 +201,17 @@ static inline gl_shader_stage - case GL_COMPUTE_SUBROUTINE: - return MESA_SHADER_COMPUTE; - case GL_TESS_CONTROL_SUBROUTINE: - return MESA_SHADER_TESS_CTRL; - case GL_TESS_EVALUATION_SUBROUTINE: +@@ -205,6 +206,7 @@ _mesa_shader_stage_from_subroutine(GLenu return MESA_SHADER_TESS_EVAL; } unreachable("not reached"); @@ -2114,17 +1541,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b } static inline GLenum - _mesa_shader_stage_to_subroutine(gl_shader_stage stage) - { - switch (stage) { - case MESA_SHADER_VERTEX: - return GL_VERTEX_SUBROUTINE; -@@ -225,16 +227,17 @@ static inline GLenum - return GL_TESS_EVALUATION_SUBROUTINE; - case MESA_SHADER_NONE: - break; - case MESA_SHADER_KERNEL: - unreachable("not reached"); +@@ -230,6 +232,7 @@ _mesa_shader_stage_to_subroutine(gl_shad break; } unreachable("not reached"); @@ -2132,17 +1549,7 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b } static inline GLenum - _mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage) - { - switch (stage) { - case MESA_SHADER_VERTEX: - return GL_VERTEX_SUBROUTINE_UNIFORM; -@@ -248,16 +251,17 @@ static inline GLenum - return GL_TESS_CONTROL_SUBROUTINE_UNIFORM; - case MESA_SHADER_TESS_EVAL: - return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM; - case MESA_SHADER_NONE: - case MESA_SHADER_KERNEL: +@@ -253,6 +256,7 @@ _mesa_shader_stage_to_subroutine_uniform break; } unreachable("not reached"); @@ -2150,8 +1557,3 @@ diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b } extern bool - _mesa_validate_pipeline_io(struct gl_pipeline_object *); - - #ifdef __cplusplus - } - #endif diff --git a/one_swizzle_to_rule_them_all.patch b/one_swizzle_to_rule_them_all.patch new file mode 100644 index 0000000..7ccbec7 --- /dev/null +++ b/one_swizzle_to_rule_them_all.patch @@ -0,0 +1,34 @@ +# HG changeset patch +# User M. Sirringhaus +# Date 1645518286 -3600 +# Tue Feb 22 09:24:46 2022 +0100 +# Node ID 494640792b4677f6462e95b90a54a4e22aeb738b +# Parent 81832d035e101471dcf52dd91de287268add7a91 +imported patch one_swizzle_to_rule_them_all.patch + +Index: firefox-102.0/gfx/webrender_bindings/RenderCompositorSWGL.cpp +=================================================================== +--- firefox-102.0.orig/gfx/webrender_bindings/RenderCompositorSWGL.cpp ++++ firefox-102.0/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 +@@ -235,6 +237,13 @@ void RenderCompositorSWGL::CommitMappedB + } + 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(); diff --git a/svg-rendering.patch b/svg-rendering.patch new file mode 100644 index 0000000..d04de51 --- /dev/null +++ b/svg-rendering.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User M. Sirringhaus +# Date 1645518286 -3600 +# Tue Feb 22 09:24:46 2022 +0100 +# Node ID 81832d035e101471dcf52dd91de287268add7a91 +# Parent 66f7ce16eb4965108687280e5443edd610631efb +imported patch svg-rendering.patch + +diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp +--- a/image/imgFrame.cpp ++++ b/image/imgFrame.cpp +@@ -372,6 +372,17 @@ nsresult imgFrame::InitWithDrawable(gfxD + 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. diff --git a/tar_stamps b/tar_stamps index 46c5834..b8244d8 100644 --- a/tar_stamps +++ b/tar_stamps @@ -1,10 +1,10 @@ PRODUCT="thunderbird" -CHANNEL="esr91" -VERSION="91.11.0" +CHANNEL="esr102" +VERSION="102.0.3" VERSION_SUFFIX="" -PREV_VERSION="91.10.0" +PREV_VERSION="102.0.2" PREV_VERSION_SUFFIX="" #SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation -RELEASE_REPO="https://hg.mozilla.org/releases/comm-esr91" -RELEASE_TAG="da48e7ecf800ec7761a3b6e0ca81e0c90adc30f7" -RELEASE_TIMESTAMP="20220628000715" +RELEASE_REPO="https://hg.mozilla.org/releases/comm-esr102" +RELEASE_TAG="608f04d334e72acd89c589b9d341a90c4023dbe5" +RELEASE_TIMESTAMP="20220718182443" diff --git a/thunderbird-102.0.3.source.tar.xz b/thunderbird-102.0.3.source.tar.xz new file mode 100644 index 0000000..ee3d0d0 --- /dev/null +++ b/thunderbird-102.0.3.source.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dcdea5d3b0d169f8df2b1542a57afdbdf4640d3a599752343cf1fcf6b2c4be0 +size 504782192 diff --git a/thunderbird-102.0.3.source.tar.xz.asc b/thunderbird-102.0.3.source.tar.xz.asc new file mode 100644 index 0000000..1d4b25a --- /dev/null +++ b/thunderbird-102.0.3.source.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEQ2D+IQnEl2MYb44h6+QekPbxL20FAmLV02wACgkQ6+QekPbx +L21PfQ/+Lv6yRetHjpXaYtkIKq1xSwdRN8WrnnirqLF2lonvA9+6yiSK0inHsQQO +Z8AvApPTqO0yuYPztcfPCcX/A0ehhUAHoiAvwQFqilNjO60NKocxypsAZTJssEmF +ltQyTdBFxX+4K8svXAGIvcL3NR33v/bMmBTip6aSE1oMLuZd2fpd8++ordWHFSyz +iirKwk8I5Qgahla1sz4cM94gDtoahwICbx0p+Iqoo1eq0UUa0srtYdlYXJpIsP4w +2R1mRAhmJkPlQdYjvwQoLHdD6CqXC6orx3bWHiFiCbSqMGhdIhUZh8HqjyANTlD6 +AsWJTctnIPyYt0TaDz+EMnfL4Mp9nAYRQnLUeZ8ncDBn13AIgIfytfD7hmFmzj/2 +czNnv+YZ8trOgeApjTiLgMzqa8XN4kzIcTa3DeLy/vyysq/8bs0nj28B2sIh/bJ2 +astUeFIk22SeEuVAWPLlYQ2XHgcgP7bNlQ+g3R3QaPjXjj8+r9AaaGOfp3JINhFg +QtVq9dsxEgIVd4BOeTFudFQekuVqO4PKxWE7HcsK841j8WC0ThCEWd3PPCDERZVK +D/bpXHcawlkmxDppFk17UO3rhjkHgrTiMHxGvGkQz3ob/ELv71a72k589D4cPbzQ +o8VDAXGVAAmks914oVczqQtTNtqkF+PN5TJZlYr4YCq+HY3R6aw= +=xTV1 +-----END PGP SIGNATURE----- diff --git a/thunderbird-91.11.0.source.tar.xz b/thunderbird-91.11.0.source.tar.xz deleted file mode 100644 index 85aa080..0000000 --- a/thunderbird-91.11.0.source.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:318e6d80eecf2d6f8af5c58e99333b8c4822a720a6193dc38848ff9a1e9e6dc8 -size 408098564 diff --git a/thunderbird-91.11.0.source.tar.xz.asc b/thunderbird-91.11.0.source.tar.xz.asc deleted file mode 100644 index 56a49fe..0000000 --- a/thunderbird-91.11.0.source.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEQ2D+IQnEl2MYb44h6+QekPbxL20FAmK6axsACgkQ6+QekPbx -L20wwQ/+Ls0P1VcNs9vitUgHjtss7r7rmZQ3jiXFaX/D9719uJfa/YcXHHgFNdXP -uVT9jjQFgIZgBN5SpIcaC7zygrh0nhbBw1Bg/4FWFyC8gHujvGMgF9hML+ltQx9x -sKZo6N5utcDfBdEU0kvCE9bgLGq00FCnke0jfut+jxv+sN0s85lPMcRR35PEjFS2 -oEDqsauTbS+BJtA+oBF6D8IaLuZh9WA6zOgcqsNWmxxfCesUfVjYMihmicwFSvFQ -SZmrQrvNd5bdB84GsLhf67uhWdu7UwjUjuALWIiTXNug8zdUgT7R4VDWpbcYXf8T -VkA7HzmF6sABKkev4JX2DOxtVJwHGJteLFRNJYZnHwzz5o6qncs5I91j15SCc0AF -u4Oriy7yis6EPRR3PLgYg9omdFQmB8E8QPgNkldfUpV9S8W2/tbKpNKCk1uMY8DL -GkZNkPQY/Wx3CnPOy6bd1ACS9GwUdavacVvaiCLnVRRW+oWeGZ2C74CST8sXnodh -hiZ1GFwshhdOowP4E3XthW+ZVDy7aEnTNaBLWT9s0jOsqeGwMK+XYEihstLPAdhN -8Dq71zrmmQvnXPUlektykssVg2jox6F9xMCuM4z628/ajFoqApeJjvMYGiaQHJ8p -BnxFDuZvB7mPlWzbtIGCCqxPRVlFq8VR9ySG3i+PDMfApOkZAjE= -=eETF ------END PGP SIGNATURE----- From 982c2db4ffa65073a45ed917336f51227372c5fb8baecc77c7bd9f5b6e61c619 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Fri, 29 Jul 2022 12:07:40 +0000 Subject: [PATCH 2/3] - Mozilla Thunderbird 102.1.0 * https://www.thunderbird.net/en-US/thunderbird/102.1.0/releasenotes MFSA 2022-32 (bsc#1201758) * CVE-2022-36319 (bmo#1737722) Mouse Position spoofing with CSS transforms * CVE-2022-36318 (bmo#1771774) Directory indexes for bundled resources reflected URL parameters * CVE-2022-36314 (bmo#1773894) Opening local .lnk files could cause unexpected network loads * CVE-2022-2505 (bmo#1769739, bmo#1772824) Memory safety bugs fixed in Thunderbird 102.1 - added mozilla-newer-cbindgen.patch to fix build with rust-cbindgen >= 0.24 (and also require that for build) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=643 --- MozillaThunderbird.changes | 18 ++++++++++++++++++ MozillaThunderbird.spec | 8 +++++--- l10n-102.0.3.tar.xz => l10n-102.1.0.tar.xz | 0 mozilla-newer-cbindgen.patch | 18 ++++++++++++++++++ tar_stamps | 8 ++++---- thunderbird-102.0.3.source.tar.xz | 3 --- thunderbird-102.0.3.source.tar.xz.asc | 16 ---------------- thunderbird-102.1.0.source.tar.xz | 3 +++ thunderbird-102.1.0.source.tar.xz.asc | 16 ++++++++++++++++ 9 files changed, 64 insertions(+), 26 deletions(-) rename l10n-102.0.3.tar.xz => l10n-102.1.0.tar.xz (100%) create mode 100644 mozilla-newer-cbindgen.patch delete mode 100644 thunderbird-102.0.3.source.tar.xz delete mode 100644 thunderbird-102.0.3.source.tar.xz.asc create mode 100644 thunderbird-102.1.0.source.tar.xz create mode 100644 thunderbird-102.1.0.source.tar.xz.asc diff --git a/MozillaThunderbird.changes b/MozillaThunderbird.changes index 2a9bc35..334d3f8 100644 --- a/MozillaThunderbird.changes +++ b/MozillaThunderbird.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Tue Jul 26 09:03:40 UTC 2022 - Wolfgang Rosenauer + +- Mozilla Thunderbird 102.1.0 + * https://www.thunderbird.net/en-US/thunderbird/102.1.0/releasenotes + MFSA 2022-32 (bsc#1201758) + * CVE-2022-36319 (bmo#1737722) + Mouse Position spoofing with CSS transforms + * CVE-2022-36318 (bmo#1771774) + Directory indexes for bundled resources reflected URL parameters + * CVE-2022-36314 (bmo#1773894) + Opening local .lnk files could cause unexpected + network loads + * CVE-2022-2505 (bmo#1769739, bmo#1772824) + Memory safety bugs fixed in Thunderbird 102.1 +- added mozilla-newer-cbindgen.patch to fix build with + rust-cbindgen >= 0.24 (and also require that for build) + ------------------------------------------------------------------- Tue Jul 19 07:31:52 UTC 2022 - Wolfgang Rosenauer diff --git a/MozillaThunderbird.spec b/MozillaThunderbird.spec index a9461ac..8b6d57b 100644 --- a/MozillaThunderbird.spec +++ b/MozillaThunderbird.spec @@ -29,8 +29,8 @@ # major 69 # mainver %major.99 %define major 102 -%define mainver %major.0.3 -%define orig_version 102.0.3 +%define mainver %major.1.0 +%define orig_version 102.1.0 %define orig_suffix %{nil} %define update_channel release %define source_prefix thunderbird-%{orig_version} @@ -119,7 +119,7 @@ BuildRequires: python36 BuildRequires: python3 >= 3.5 BuildRequires: python3-devel %endif -BuildRequires: rust-cbindgen >= 0.23.0 +BuildRequires: rust-cbindgen >= 0.24.0 BuildRequires: unzip BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXt-devel @@ -206,6 +206,7 @@ Patch19: mozilla-silence-no-return-type.patch Patch20: mozilla-bmo531915.patch Patch21: one_swizzle_to_rule_them_all.patch Patch22: svg-rendering.patch +Patch23: mozilla-newer-cbindgen.patch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: /bin/sh @@ -294,6 +295,7 @@ fi %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 %endif %build diff --git a/l10n-102.0.3.tar.xz b/l10n-102.1.0.tar.xz similarity index 100% rename from l10n-102.0.3.tar.xz rename to l10n-102.1.0.tar.xz diff --git a/mozilla-newer-cbindgen.patch b/mozilla-newer-cbindgen.patch new file mode 100644 index 0000000..89df451 --- /dev/null +++ b/mozilla-newer-cbindgen.patch @@ -0,0 +1,18 @@ +Description: Remove an extra constant definition that is now being generated by newer versions of cbindgen (0.24), and causing build failures because it is defined in several places. +Author: Olivier Tilloy +Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 +Forwarded: not-needed + +diff --git a/gfx/webrender_bindings/webrender_ffi.h b/gfx/webrender_bindings/webrender_ffi.h +index b1d67b1..eb79974 100644 +--- a/gfx/webrender_bindings/webrender_ffi.h ++++ b/gfx/webrender_bindings/webrender_ffi.h +@@ -73,8 +73,6 @@ struct WrPipelineInfo; + struct WrPipelineIdAndEpoch; + using WrPipelineIdEpochs = nsTArray; + +-const uint64_t ROOT_CLIP_CHAIN = ~0; +- + } // namespace wr + } // namespace mozilla + diff --git a/tar_stamps b/tar_stamps index b8244d8..1f47111 100644 --- a/tar_stamps +++ b/tar_stamps @@ -1,10 +1,10 @@ PRODUCT="thunderbird" CHANNEL="esr102" -VERSION="102.0.3" +VERSION="102.1.0" VERSION_SUFFIX="" -PREV_VERSION="102.0.2" +PREV_VERSION="102.0.3" PREV_VERSION_SUFFIX="" #SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation RELEASE_REPO="https://hg.mozilla.org/releases/comm-esr102" -RELEASE_TAG="608f04d334e72acd89c589b9d341a90c4023dbe5" -RELEASE_TIMESTAMP="20220718182443" +RELEASE_TAG="7fc691fc18b8cddcf185d1b72ebc403e8983ada9" +RELEASE_TIMESTAMP="20220725200630" diff --git a/thunderbird-102.0.3.source.tar.xz b/thunderbird-102.0.3.source.tar.xz deleted file mode 100644 index ee3d0d0..0000000 --- a/thunderbird-102.0.3.source.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9dcdea5d3b0d169f8df2b1542a57afdbdf4640d3a599752343cf1fcf6b2c4be0 -size 504782192 diff --git a/thunderbird-102.0.3.source.tar.xz.asc b/thunderbird-102.0.3.source.tar.xz.asc deleted file mode 100644 index 1d4b25a..0000000 --- a/thunderbird-102.0.3.source.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEQ2D+IQnEl2MYb44h6+QekPbxL20FAmLV02wACgkQ6+QekPbx -L21PfQ/+Lv6yRetHjpXaYtkIKq1xSwdRN8WrnnirqLF2lonvA9+6yiSK0inHsQQO -Z8AvApPTqO0yuYPztcfPCcX/A0ehhUAHoiAvwQFqilNjO60NKocxypsAZTJssEmF -ltQyTdBFxX+4K8svXAGIvcL3NR33v/bMmBTip6aSE1oMLuZd2fpd8++ordWHFSyz -iirKwk8I5Qgahla1sz4cM94gDtoahwICbx0p+Iqoo1eq0UUa0srtYdlYXJpIsP4w -2R1mRAhmJkPlQdYjvwQoLHdD6CqXC6orx3bWHiFiCbSqMGhdIhUZh8HqjyANTlD6 -AsWJTctnIPyYt0TaDz+EMnfL4Mp9nAYRQnLUeZ8ncDBn13AIgIfytfD7hmFmzj/2 -czNnv+YZ8trOgeApjTiLgMzqa8XN4kzIcTa3DeLy/vyysq/8bs0nj28B2sIh/bJ2 -astUeFIk22SeEuVAWPLlYQ2XHgcgP7bNlQ+g3R3QaPjXjj8+r9AaaGOfp3JINhFg -QtVq9dsxEgIVd4BOeTFudFQekuVqO4PKxWE7HcsK841j8WC0ThCEWd3PPCDERZVK -D/bpXHcawlkmxDppFk17UO3rhjkHgrTiMHxGvGkQz3ob/ELv71a72k589D4cPbzQ -o8VDAXGVAAmks914oVczqQtTNtqkF+PN5TJZlYr4YCq+HY3R6aw= -=xTV1 ------END PGP SIGNATURE----- diff --git a/thunderbird-102.1.0.source.tar.xz b/thunderbird-102.1.0.source.tar.xz new file mode 100644 index 0000000..201beac --- /dev/null +++ b/thunderbird-102.1.0.source.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59195f813c9f43ff1c0eb2ac20e14f6f309f7c61c030010fde5010f036fcee74 +size 502081292 diff --git a/thunderbird-102.1.0.source.tar.xz.asc b/thunderbird-102.1.0.source.tar.xz.asc new file mode 100644 index 0000000..bca72d0 --- /dev/null +++ b/thunderbird-102.1.0.source.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEQ2D+IQnEl2MYb44h6+QekPbxL20FAmLfN+UACgkQ6+QekPbx +L22F3g/+ILLVYYT/AEr4mJtXqjuT0EwJBLRapCdqAv2Q0FWZU0NxtGB6eDVOChcx +vFL8/Hb1Jx5V6QTzxcyVu+pnAhQC1WMBbBdyAY0FNE9mzN7Hyud2UbRKXpIfnTkL +LF0HuvxhWx2WV1WQUkNXfKlJrCeSoefD0iFIX/f6y1Otvc4tYuBDdvNvpk9fAF9+ +GphtPoUv/xF9XbRl5WiQo8zHeVzizSTisE3aagNGbTTpJupwu8ECTVlriyI0/T4k +kpJlShj0MoyRg4OAQyqlXK8Cd9pmWar1gjDO5bhOSWAIs3pOW7E9hrrKi900H98c +NkJWFyMm+7NTLDcpj30bpFRh7Yb0Ej5YTdFYvkDG9XqpcLKZY2Y1pCARRi3PbUtD +r2/xczrUn5QufzmYG1HvkA6RVylIrzSEqWvhojbhUrrX00i3aPo7QCMK9lFwkjOb +kYMvaqhdez+bVpnDo028Fe5f6lh34kXAA3DxxqrC/SpLCeMPI3/wwL/L2BRGZQUO +BnSRlU63UwsmwTafSMlocNFcZ57olwrT0vdRdiaWG4eGaIvdYhKcGwuhM7xZ7LVY +65fkPmVKbWYi2+OWNzAygR5KA2bzpEq6w2bMDGIBnnDnjfPu6AIId83K0WFDofaz +KHtp2Pv7YIbH9PuLqigX5mgDEY5at+CcajkxeOb838ZvxU1W8R8= +=AU7Y +-----END PGP SIGNATURE----- From 32ed6a10bbea59d7ff08c9aa1c8cc54424780fae9c2f0e60f4f5800f37b96a9d Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Mon, 1 Aug 2022 14:43:32 +0000 Subject: [PATCH 3/3] - added mozilla-pgo.patch to fix LTO builds with gcc OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=644 --- MozillaThunderbird.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/MozillaThunderbird.changes b/MozillaThunderbird.changes index 334d3f8..1160a2e 100644 --- a/MozillaThunderbird.changes +++ b/MozillaThunderbird.changes @@ -15,6 +15,7 @@ Tue Jul 26 09:03:40 UTC 2022 - Wolfgang Rosenauer Memory safety bugs fixed in Thunderbird 102.1 - added mozilla-newer-cbindgen.patch to fix build with rust-cbindgen >= 0.24 (and also require that for build) +- added mozilla-pgo.patch to fix LTO builds with gcc ------------------------------------------------------------------- Tue Jul 19 07:31:52 UTC 2022 - Wolfgang Rosenauer