summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-04-15 17:08:18 -0400
committerB. Stack <bgstack15@gmail.com>2022-04-15 17:08:18 -0400
commit251329f0d04bccf2c49f3032b1f62c7da589fe27 (patch)
tree9bed5d62e44cecc08a59620f7ba2ceba4919d768
parentlibrewolf for fedora 99.0.1-1 rc1 (diff)
downloadlibrewolf-fedora-ff-251329f0d04bccf2c49f3032b1f62c7da589fe27.tar.gz
librewolf-fedora-ff-251329f0d04bccf2c49f3032b1f62c7da589fe27.tar.bz2
librewolf-fedora-ff-251329f0d04bccf2c49f3032b1f62c7da589fe27.zip
fix placement of ubo xpi
-rw-r--r--D141827.diff207
-rw-r--r--D141828.diff252
-rw-r--r--firefox.desktop1
-rw-r--r--firefox.spec57
-rw-r--r--librewolf.spec2
-rw-r--r--libwebrtc-screen-cast-sync.patch2
-rw-r--r--mozilla-1670333.patch38
-rw-r--r--pgo.patch38
8 files changed, 517 insertions, 80 deletions
diff --git a/D141827.diff b/D141827.diff
new file mode 100644
index 0000000..67caf5f
--- /dev/null
+++ b/D141827.diff
@@ -0,0 +1,207 @@
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.D141827 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.D141827 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2022-04-07 10:10:11.608526890 +0200
+@@ -6,7 +6,7 @@
+
+ #include "FFmpegVideoFramePool.h"
+ #include "FFmpegLog.h"
+-#include "mozilla/widget/DMABufLibWrapper.h"
++#include "mozilla/widget/DMABufLibWrapper.h"
+ #include "libavutil/pixfmt.h"
+
+ #undef FFMPEG_LOG
+@@ -15,11 +15,11 @@
+
+ namespace mozilla {
+
+-RefPtr<layers::Image> VideoFrameSurfaceVAAPI::GetAsImage() {
++RefPtr<layers::Image> VideoFrameSurface::GetAsImage() {
+ return new layers::DMABUFSurfaceImage(mSurface);
+ }
+
+-VideoFrameSurfaceVAAPI::VideoFrameSurfaceVAAPI(DMABufSurface* aSurface)
++VideoFrameSurface::VideoFrameSurface(DMABufSurface* aSurface)
+ : mSurface(aSurface),
+ mLib(nullptr),
+ mAVHWFramesContext(nullptr),
+@@ -30,22 +30,22 @@ VideoFrameSurfaceVAAPI::VideoFrameSurfac
+ MOZ_ASSERT(mSurface);
+ MOZ_RELEASE_ASSERT(mSurface->GetAsDMABufSurfaceYUV());
+ mSurface->GlobalRefCountCreate();
+- FFMPEG_LOG("VideoFrameSurfaceVAAPI: creating surface UID = %d",
++ FFMPEG_LOG("VideoFrameSurface: creating surface UID = %d",
+ mSurface->GetUID());
+ }
+
+-void VideoFrameSurfaceVAAPI::LockVAAPIData(AVCodecContext* aAVCodecContext,
++void VideoFrameSurface::LockVAAPIData(AVCodecContext* aAVCodecContext,
+ AVFrame* aAVFrame,
+ FFmpegLibWrapper* aLib) {
+- FFMPEG_LOG("VideoFrameSurfaceVAAPI: VAAPI locking dmabuf surface UID = %d",
++ FFMPEG_LOG("VideoFrameSurface: VAAPI locking dmabuf surface UID = %d",
+ mSurface->GetUID());
+ mLib = aLib;
+ mAVHWFramesContext = aLib->av_buffer_ref(aAVCodecContext->hw_frames_ctx);
+ mHWAVBuffer = aLib->av_buffer_ref(aAVFrame->buf[0]);
+ }
+
+-void VideoFrameSurfaceVAAPI::ReleaseVAAPIData(bool aForFrameRecycle) {
+- FFMPEG_LOG("VideoFrameSurfaceVAAPI: VAAPI releasing dmabuf surface UID = %d",
++void VideoFrameSurface::ReleaseVAAPIData(bool aForFrameRecycle) {
++ FFMPEG_LOG("VideoFrameSurface: VAAPI releasing dmabuf surface UID = %d",
+ mSurface->GetUID());
+
+ // It's possible to unref GPU data while IsUsed() is still set.
+@@ -67,8 +67,8 @@ void VideoFrameSurfaceVAAPI::ReleaseVAAP
+ }
+ }
+
+-VideoFrameSurfaceVAAPI::~VideoFrameSurfaceVAAPI() {
+- FFMPEG_LOG("VideoFrameSurfaceVAAPI: deleting dmabuf surface UID = %d",
++VideoFrameSurface::~VideoFrameSurface() {
++ FFMPEG_LOG("VideoFrameSurface: deleting dmabuf surface UID = %d",
+ mSurface->GetUID());
+ // We're about to quit, no need to recycle the frames.
+ ReleaseVAAPIData(/* aForFrameRecycle */ false);
+@@ -84,9 +84,8 @@ VideoFramePool::~VideoFramePool() {
+ void VideoFramePool::ReleaseUnusedVAAPIFrames() {
+ MutexAutoLock lock(mSurfaceLock);
+ for (const auto& surface : mDMABufSurfaces) {
+- auto* vaapiSurface = surface->AsVideoFrameSurfaceVAAPI();
+- if (!vaapiSurface->IsUsed()) {
+- vaapiSurface->ReleaseVAAPIData();
++ if (!surface->IsUsed()) {
++ surface->ReleaseVAAPIData();
+ }
+ }
+ }
+@@ -96,8 +95,7 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ if (surface->IsUsed()) {
+ continue;
+ }
+- auto* vaapiSurface = surface->AsVideoFrameSurfaceVAAPI();
+- vaapiSurface->ReleaseVAAPIData();
++ surface->ReleaseVAAPIData();
+ return surface;
+ }
+ return nullptr;
+@@ -121,7 +119,7 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ return nullptr;
+ }
+ FFMPEG_LOG("Created new VA-API DMABufSurface UID = %d", surface->GetUID());
+- RefPtr<VideoFrameSurfaceVAAPI> surf = new VideoFrameSurfaceVAAPI(surface);
++ RefPtr<VideoFrameSurface> surf = new VideoFrameSurface(surface);
+ if (!mTextureCreationWorks) {
+ mTextureCreationWorks = Some(surface->VerifyTextureCreation());
+ }
+@@ -138,11 +136,8 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ }
+ FFMPEG_LOG("Reusing VA-API DMABufSurface UID = %d", surface->GetUID());
+ }
+-
+- auto* vaapiSurface = videoSurface->AsVideoFrameSurfaceVAAPI();
+- vaapiSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib);
+- vaapiSurface->MarkAsUsed();
+-
++ videoSurface->LockVAAPIData(aAVCodecContext, aAVFrame, aLib);
++ videoSurface->MarkAsUsed();
+ return videoSurface;
+ }
+
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.D141827 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.D141827 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2022-04-07 10:09:46.527708638 +0200
+@@ -17,42 +17,17 @@
+ namespace mozilla {
+
+ class VideoFramePool;
+-class VideoFrameSurfaceVAAPI;
+
+-class VideoFrameSurface {
+- public:
+- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VideoFrameSurface)
+-
+- VideoFrameSurface() = default;
+-
+- virtual VideoFrameSurfaceVAAPI* AsVideoFrameSurfaceVAAPI() { return nullptr; }
+-
+- virtual void SetYUVColorSpace(gfx::YUVColorSpace aColorSpace) = 0;
+- virtual void SetColorRange(gfx::ColorRange aColorRange) = 0;
+-
+- virtual RefPtr<DMABufSurfaceYUV> GetDMABufSurface() { return nullptr; };
+- virtual RefPtr<layers::Image> GetAsImage() = 0;
+-
+- // Don't allow VideoFrameSurface plain copy as it leads to
+- // unexpected DMABufSurface/HW buffer releases and we don't want to
+- // deep copy them.
+- VideoFrameSurface(const VideoFrameSurface&) = delete;
+- const VideoFrameSurface& operator=(VideoFrameSurface const&) = delete;
+-
+- protected:
+- virtual ~VideoFrameSurface(){};
+-};
+-
+-// VideoFrameSurfaceVAAPI holds a reference to GPU data with a video frame.
++// VideoFrameSurface holds a reference to GPU data with a video frame.
+ //
+ // Actual GPU pixel data are stored at DMABufSurface and
+ // DMABufSurface is passed to gecko GL rendering pipeline via.
+ // DMABUFSurfaceImage.
+ //
+-// VideoFrameSurfaceVAAPI can optionally hold VA-API ffmpeg related data to keep
++// VideoFrameSurface can optionally hold VA-API ffmpeg related data to keep
+ // GPU data locked untill we need them.
+ //
+-// VideoFrameSurfaceVAAPI is used for both HW accelerated video decoding
++// VideoFrameSurface is used for both HW accelerated video decoding
+ // (VA-API) and ffmpeg SW decoding.
+ //
+ // VA-API scenario
+@@ -72,13 +47,13 @@ class VideoFrameSurface {
+ // Unfortunately there isn't any obvious way how to mark particular VASurface
+ // as used. The best we can do is to hold a reference to particular AVBuffer
+ // from decoded AVFrame and AVHWFramesContext which owns the AVBuffer.
+-class VideoFrameSurfaceVAAPI final : public VideoFrameSurface {
++class VideoFrameSurface {
+ friend class VideoFramePool;
+
+ public:
+- explicit VideoFrameSurfaceVAAPI(DMABufSurface* aSurface);
++ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VideoFrameSurface)
+
+- VideoFrameSurfaceVAAPI* AsVideoFrameSurfaceVAAPI() final { return this; }
++ explicit VideoFrameSurface(DMABufSurface* aSurface);
+
+ void SetYUVColorSpace(mozilla::gfx::YUVColorSpace aColorSpace) {
+ mSurface->GetAsDMABufSurfaceYUV()->SetYUVColorSpace(aColorSpace);
+@@ -93,6 +68,12 @@ class VideoFrameSurfaceVAAPI final : pub
+
+ RefPtr<layers::Image> GetAsImage();
+
++ // Don't allow VideoFrameSurface plain copy as it leads to
++ // unexpected DMABufSurface/HW buffer releases and we don't want to
++ // deep copy them.
++ VideoFrameSurface(const VideoFrameSurface&) = delete;
++ const VideoFrameSurface& operator=(VideoFrameSurface const&) = delete;
++
+ protected:
+ // Lock VAAPI related data
+ void LockVAAPIData(AVCodecContext* aAVCodecContext, AVFrame* aAVFrame,
+@@ -107,7 +88,7 @@ class VideoFrameSurfaceVAAPI final : pub
+ void MarkAsUsed() { mSurface->GlobalRefAdd(); }
+
+ private:
+- virtual ~VideoFrameSurfaceVAAPI();
++ virtual ~VideoFrameSurface();
+
+ const RefPtr<DMABufSurface> mSurface;
+ const FFmpegLibWrapper* mLib;
+@@ -132,7 +113,7 @@ class VideoFramePool final {
+ private:
+ // Protect mDMABufSurfaces pool access
+ Mutex mSurfaceLock;
+- nsTArray<RefPtr<VideoFrameSurfaceVAAPI>> mDMABufSurfaces;
++ nsTArray<RefPtr<VideoFrameSurface>> mDMABufSurfaces;
+ // We may fail to create texture over DMABuf memory due to driver bugs so
+ // check that before we export first DMABuf video frame.
+ Maybe<bool> mTextureCreationWorks;
diff --git a/D141828.diff b/D141828.diff
new file mode 100644
index 0000000..b2475e9
--- /dev/null
+++ b/D141828.diff
@@ -0,0 +1,252 @@
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg58/moz.build.D141828 firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg58/moz.build
+--- firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg58/moz.build.D141828 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg58/moz.build 2022-04-07 10:11:34.981246890 +0200
+@@ -30,6 +30,9 @@ if CONFIG['MOZ_WAYLAND']:
+ CXXFLAGS += CONFIG['MOZ_GTK3_CFLAGS']
+ DEFINES['MOZ_WAYLAND_USE_VAAPI'] = 1
+ USE_LIBS += ['mozva']
++ UNIFIED_SOURCES += [
++ '../FFmpegVideoFramePool.cpp',
++ ]
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg59/moz.build.D141828 firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg59/moz.build
+--- firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg59/moz.build.D141828 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/ffmpeg59/moz.build 2022-04-07 10:11:34.981246890 +0200
+@@ -30,6 +30,9 @@ if CONFIG["MOZ_WAYLAND"]:
+ CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
+ DEFINES["MOZ_WAYLAND_USE_VAAPI"] = 1
+ USE_LIBS += ["mozva"]
++ UNIFIED_SOURCES += [
++ "../FFmpegVideoFramePool.cpp",
++ ]
+
+ include("/ipc/chromium/chromium-config.mozbuild")
+
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.D141828 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.D141828 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp 2022-04-07 10:11:34.981246890 +0200
+@@ -814,7 +814,7 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER
+ # ifdef MOZ_WAYLAND_USE_VAAPI
+ // Create VideoFramePool in case we need it.
+ if (!mVideoFramePool && mEnableHardwareDecoding) {
+- mVideoFramePool = MakeUnique<VideoFramePool>();
++ mVideoFramePool = MakeUnique<VideoFramePool<LIBAV_VER>>();
+ }
+
+ // Release unused VA-API surfaces before avcodec_receive_frame() as
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h.D141828 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h.D141828 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h 2022-04-07 10:11:34.981246890 +0200
+@@ -16,6 +16,9 @@
+ #if LIBAVCODEC_VERSION_MAJOR >= 57 && LIBAVUTIL_VERSION_MAJOR >= 56
+ # include "mozilla/layers/TextureClient.h"
+ #endif
++#ifdef MOZ_WAYLAND_USE_VAAPI
++# include "FFmpegVideoFramePool.h"
++#endif
+
+ struct _VADRMPRIMESurfaceDescriptor;
+ typedef struct _VADRMPRIMESurfaceDescriptor VADRMPRIMESurfaceDescriptor;
+@@ -23,7 +26,6 @@ typedef struct _VADRMPRIMESurfaceDescrip
+ namespace mozilla {
+
+ class ImageBufferWrapper;
+-class VideoFramePool;
+
+ template <int V>
+ class FFmpegVideoDecoder : public FFmpegDataDecoder<V> {};
+@@ -138,7 +140,7 @@ class FFmpegVideoDecoder<LIBAV_VER>
+ AVBufferRef* mVAAPIDeviceContext;
+ bool mEnableHardwareDecoding;
+ VADisplay mDisplay;
+- UniquePtr<VideoFramePool> mVideoFramePool;
++ UniquePtr<VideoFramePool<LIBAV_VER>> mVideoFramePool;
+ static nsTArray<AVCodecID> mAcceleratedFormats;
+ #endif
+ RefPtr<KnowsCompositor> mImageAllocator;
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.D141828 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp.D141828 2022-04-07 10:11:34.980246857 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.cpp 2022-04-07 10:16:02.390971008 +0200
+@@ -5,6 +5,7 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ #include "FFmpegVideoFramePool.h"
++#include "PlatformDecoderModule.h"
+ #include "FFmpegLog.h"
+ #include "mozilla/widget/DMABufLibWrapper.h"
+ #include "libavutil/pixfmt.h"
+@@ -15,11 +16,11 @@
+
+ namespace mozilla {
+
+-RefPtr<layers::Image> VideoFrameSurface::GetAsImage() {
++RefPtr<layers::Image> VideoFrameSurface<LIBAV_VER>::GetAsImage() {
+ return new layers::DMABUFSurfaceImage(mSurface);
+ }
+
+-VideoFrameSurface::VideoFrameSurface(DMABufSurface* aSurface)
++VideoFrameSurface<LIBAV_VER>::VideoFrameSurface(DMABufSurface* aSurface)
+ : mSurface(aSurface),
+ mLib(nullptr),
+ mAVHWFramesContext(nullptr),
+@@ -34,7 +35,7 @@ VideoFrameSurface::VideoFrameSurface(DMA
+ mSurface->GetUID());
+ }
+
+-void VideoFrameSurface::LockVAAPIData(AVCodecContext* aAVCodecContext,
++void VideoFrameSurface<LIBAV_VER>::LockVAAPIData(AVCodecContext* aAVCodecContext,
+ AVFrame* aAVFrame,
+ FFmpegLibWrapper* aLib) {
+ FFMPEG_LOG("VideoFrameSurface: VAAPI locking dmabuf surface UID = %d",
+@@ -44,7 +45,7 @@ void VideoFrameSurface::LockVAAPIData(AV
+ mHWAVBuffer = aLib->av_buffer_ref(aAVFrame->buf[0]);
+ }
+
+-void VideoFrameSurface::ReleaseVAAPIData(bool aForFrameRecycle) {
++void VideoFrameSurface<LIBAV_VER>::ReleaseVAAPIData(bool aForFrameRecycle) {
+ FFMPEG_LOG("VideoFrameSurface: VAAPI releasing dmabuf surface UID = %d",
+ mSurface->GetUID());
+
+@@ -67,21 +68,22 @@ void VideoFrameSurface::ReleaseVAAPIData
+ }
+ }
+
+-VideoFrameSurface::~VideoFrameSurface() {
++VideoFrameSurface<LIBAV_VER>::~VideoFrameSurface() {
+ FFMPEG_LOG("VideoFrameSurface: deleting dmabuf surface UID = %d",
+ mSurface->GetUID());
+ // We're about to quit, no need to recycle the frames.
+ ReleaseVAAPIData(/* aForFrameRecycle */ false);
+ }
+
+-VideoFramePool::VideoFramePool() : mSurfaceLock("VideoFramePoolSurfaceLock") {}
++VideoFramePool<LIBAV_VER>::VideoFramePool()
++ : mSurfaceLock("VideoFramePoolSurfaceLock") {}
+
+-VideoFramePool::~VideoFramePool() {
++VideoFramePool<LIBAV_VER>::~VideoFramePool() {
+ MutexAutoLock lock(mSurfaceLock);
+ mDMABufSurfaces.Clear();
+ }
+
+-void VideoFramePool::ReleaseUnusedVAAPIFrames() {
++void VideoFramePool<LIBAV_VER>::ReleaseUnusedVAAPIFrames() {
+ MutexAutoLock lock(mSurfaceLock);
+ for (const auto& surface : mDMABufSurfaces) {
+ if (!surface->IsUsed()) {
+@@ -90,7 +92,8 @@ void VideoFramePool::ReleaseUnusedVAAPIF
+ }
+ }
+
+-RefPtr<VideoFrameSurface> VideoFramePool::GetFreeVideoFrameSurface() {
++RefPtr<VideoFrameSurface<LIBAV_VER>>
++VideoFramePool<LIBAV_VER>::GetFreeVideoFrameSurface() {
+ for (auto& surface : mDMABufSurfaces) {
+ if (surface->IsUsed()) {
+ continue;
+@@ -101,7 +104,8 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ return nullptr;
+ }
+
+-RefPtr<VideoFrameSurface> VideoFramePool::GetVideoFrameSurface(
++RefPtr<VideoFrameSurface<LIBAV_VER>>
++VideoFramePool<LIBAV_VER>::GetVideoFrameSurface(
+ VADRMPRIMESurfaceDescriptor& aVaDesc, AVCodecContext* aAVCodecContext,
+ AVFrame* aAVFrame, FFmpegLibWrapper* aLib) {
+ if (aVaDesc.fourcc != VA_FOURCC_NV12 && aVaDesc.fourcc != VA_FOURCC_YV12 &&
+@@ -111,7 +115,8 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ }
+
+ MutexAutoLock lock(mSurfaceLock);
+- RefPtr<VideoFrameSurface> videoSurface = GetFreeVideoFrameSurface();
++ RefPtr<VideoFrameSurface<LIBAV_VER>> videoSurface =
++ GetFreeVideoFrameSurface();
+ if (!videoSurface) {
+ RefPtr<DMABufSurfaceYUV> surface =
+ DMABufSurfaceYUV::CreateYUVSurface(aVaDesc);
+@@ -119,7 +124,8 @@ RefPtr<VideoFrameSurface> VideoFramePool
+ return nullptr;
+ }
+ FFMPEG_LOG("Created new VA-API DMABufSurface UID = %d", surface->GetUID());
+- RefPtr<VideoFrameSurface> surf = new VideoFrameSurface(surface);
++ RefPtr<VideoFrameSurface<LIBAV_VER>> surf =
++ new VideoFrameSurface<LIBAV_VER>(surface);
+ if (!mTextureCreationWorks) {
+ mTextureCreationWorks = Some(surface->VerifyTextureCreation());
+ }
+diff -up firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.D141828 firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h
+--- firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h.D141828 2022-04-07 10:11:34.980246857 +0200
++++ firefox-99.0/dom/media/platforms/ffmpeg/FFmpegVideoFramePool.h 2022-04-07 10:14:54.478755409 +0200
+@@ -7,8 +7,9 @@
+ #ifndef __FFmpegVideoFramePool_h__
+ #define __FFmpegVideoFramePool_h__
+
+-#include "FFmpegVideoDecoder.h"
+ #include "FFmpegLibWrapper.h"
++#include "FFmpegLibs.h"
++#include "FFmpegLog.h"
+
+ #include "mozilla/layers/DMABUFSurfaceImage.h"
+ #include "mozilla/widget/DMABufLibWrapper.h"
+@@ -16,8 +17,6 @@
+
+ namespace mozilla {
+
+-class VideoFramePool;
+-
+ // VideoFrameSurface holds a reference to GPU data with a video frame.
+ //
+ // Actual GPU pixel data are stored at DMABufSurface and
+@@ -47,8 +46,19 @@ class VideoFramePool;
+ // Unfortunately there isn't any obvious way how to mark particular VASurface
+ // as used. The best we can do is to hold a reference to particular AVBuffer
+ // from decoded AVFrame and AVHWFramesContext which owns the AVBuffer.
+-class VideoFrameSurface {
+- friend class VideoFramePool;
++template <int V>
++class VideoFrameSurface {};
++template <>
++class VideoFrameSurface<LIBAV_VER>;
++
++template <int V>
++class VideoFramePool {};
++template <>
++class VideoFramePool<LIBAV_VER>;
++
++template <>
++class VideoFrameSurface<LIBAV_VER> {
++ friend class VideoFramePool<LIBAV_VER>;
+
+ public:
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VideoFrameSurface)
+@@ -97,23 +107,24 @@ class VideoFrameSurface {
+ };
+
+ // VideoFramePool class is thread-safe.
+-class VideoFramePool final {
++template <>
++class VideoFramePool<LIBAV_VER> {
+ public:
+ VideoFramePool();
+ ~VideoFramePool();
+
+- RefPtr<VideoFrameSurface> GetVideoFrameSurface(
++ RefPtr<VideoFrameSurface<LIBAV_VER>> GetVideoFrameSurface(
+ VADRMPRIMESurfaceDescriptor& aVaDesc, AVCodecContext* aAVCodecContext,
+ AVFrame* aAVFrame, FFmpegLibWrapper* aLib);
+ void ReleaseUnusedVAAPIFrames();
+
+ private:
+- RefPtr<VideoFrameSurface> GetFreeVideoFrameSurface();
++ RefPtr<VideoFrameSurface<LIBAV_VER>> GetFreeVideoFrameSurface();
+
+ private:
+ // Protect mDMABufSurfaces pool access
+ Mutex mSurfaceLock;
+- nsTArray<RefPtr<VideoFrameSurface>> mDMABufSurfaces;
++ nsTArray<RefPtr<VideoFrameSurface<LIBAV_VER>>> mDMABufSurfaces;
+ // We may fail to create texture over DMABuf memory due to driver bugs so
+ // check that before we export first DMABuf video frame.
+ Maybe<bool> mTextureCreationWorks;
diff --git a/firefox.desktop b/firefox.desktop
index 35c2c48..6e51fb3 100644
--- a/firefox.desktop
+++ b/firefox.desktop
@@ -271,4 +271,5 @@ Exec=firefox --private-window %u
[Desktop Action profile-manager-window]
Name=Open the Profile Manager
Name[cs]=Správa profilů
+Name[de]=Profilverwaltung öffnen
Exec=firefox --ProfileManager
diff --git a/firefox.spec b/firefox.spec
index 6e03434..2e0a544 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -126,7 +126,7 @@ ExcludeArch: aarch64
%if %{?system_nss}
%global nspr_version 4.26
%global nspr_build_version %{nspr_version}
-%global nss_version 3.74
+%global nss_version 3.76
%global nss_build_version %{nss_version}
%endif
@@ -162,13 +162,13 @@ ExcludeArch: aarch64
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 98.0
-Release: 3%{?pre_tag}%{?dist}
+Version: 99.0.1
+Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
%if %{with langpacks}
-Source1: firefox-langpacks-%{version}%{?pre_version}-20220305.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20220413.tar.xz
%endif
Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig
@@ -214,17 +214,8 @@ Patch49: build-arm-libaom.patch
Patch53: firefox-gcc-build.patch
Patch54: mozilla-1669639.patch
Patch55: firefox-testing.patch
-Patch57: firefox-disable-ffvpx-with-vapi.patch
Patch61: firefox-glibc-dynstack.patch
Patch62: build-python.patch
-#Patch64: mozilla-1753402.patch
-# GCC12 build fixes
-Patch65: D139022.diff
-Patch66: D139078.diff
-Patch67: D139088.diff
-Patch68: D139703.diff
-Patch69: D139704.diff
-Patch70: crossbeam-downgrade-rhbz2063961.patch
Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch
# Test patches
@@ -250,11 +241,8 @@ Patch402: mozilla-1196777.patch
Patch407: mozilla-1667096.patch
Patch408: mozilla-1663844.patch
Patch415: mozilla-1670333.patch
-# ffmpeg50
-Patch500: D139696.diff
-Patch501: D139697.diff
-Patch502: D139698.diff
-Patch503: D139699.diff
+Patch416: D141827.diff
+Patch417: D141828.diff
# PGO/LTO patches
Patch600: pgo.patch
@@ -471,17 +459,6 @@ This package contains results of tests executed during build.
%patch49 -p1 -b .build-arm-libaom
%patch53 -p1 -b .firefox-gcc-build
%patch54 -p1 -b .1669639
-#%patch55 -p1 -b .testing
-%patch57 -p1 -b .ffvpx-with-vapi
-#%patch64 -p1 -b .1753402
-%patch65 -p1 -b .D139022
-%patch66 -p1 -b .D139078
-%patch67 -p1 -b .D139088
-%patch68 -p1 -b .D139703
-%patch69 -p1 -b .D139704
-%ifarch aarch64
-%patch70 -p1 -b .crossbeam-downgrade-rhbz2063961
-%endif
%patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12
# Test patches
@@ -505,14 +482,8 @@ This package contains results of tests executed during build.
%patch407 -p1 -b .1667096
%patch408 -p1 -b .1663844
%patch415 -p1 -b .1670333
-
-# ffmpeg50
-%ifnarch ppc64le
-%patch500 -p1 -b .D139696
-%patch501 -p1 -b .D139697
-%patch502 -p1 -b .D139698
-%patch503 -p1 -b .D139699
-%endif
+%patch416 -p1 -b .D141827
+%patch417 -p1 -b .D141828
# PGO patches
%if %{build_with_pgo}
@@ -1079,6 +1050,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Wed Apr 13 2022 Martin Stransky <stransky@redhat.com> - 99.0.1-1
+- Updated to 99.0.1
+
+* Wed Apr 6 2022 Martin Stransky <stransky@redhat.com> - 99.0-1
+- Updated to 99.0
+
+* Thu Mar 31 2022 Martin Stransky <stransky@redhat.com> - 98.0.2-1
+- Updated to 98.0.2
+
+* Wed Mar 30 2022 Jan Grulich <jgrulich@redhat.com> - 98.0-4
+- Wayland screensharing: avoid potential crash when cursor metadata are not set
+
* Wed Mar 16 2022 Martin Stransky <stransky@redhat.com> - 98.0-3
- Added a workaround for rhbz#2063961
diff --git a/librewolf.spec b/librewolf.spec
index fa4350b..079e291 100644
--- a/librewolf.spec
+++ b/librewolf.spec
@@ -1095,7 +1095,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/defaults/pref/local-settings.js
%{mozappdir}/distribution/policies.json
%{mozappdir}/librewolf.cfg
-%{_libdir}/browser/extensions/*.xpi
+%{mozappdir}/browser/extensions/*.xpi
%{_bindir}/librewolf
%{mozappdir}/librewolf
%{mozappdir}/librewolf-bin
diff --git a/libwebrtc-screen-cast-sync.patch b/libwebrtc-screen-cast-sync.patch
index da909ee..09bfd0f 100644
--- a/libwebrtc-screen-cast-sync.patch
+++ b/libwebrtc-screen-cast-sync.patch
@@ -9344,7 +9344,7 @@ index 0000000..c6ba661
+ const struct spa_meta_cursor* cursor =
+ static_cast<struct spa_meta_cursor*>(spa_buffer_find_meta_data(
+ spa_buffer, SPA_META_Cursor, sizeof(*cursor)));
-+ if (spa_meta_cursor_is_valid(cursor)) {
++ if (cursor && spa_meta_cursor_is_valid(cursor)) {
+ struct spa_meta_bitmap* bitmap = nullptr;
+
+ if (cursor->bitmap_offset)
diff --git a/mozilla-1670333.patch b/mozilla-1670333.patch
index 19e64c0..1c5c476 100644
--- a/mozilla-1670333.patch
+++ b/mozilla-1670333.patch
@@ -1,6 +1,6 @@
-diff -up firefox-88.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-88.0/dom/media/mp4/MP4Demuxer.cpp
---- firefox-88.0/dom/media/mp4/MP4Demuxer.cpp.1670333 2021-04-15 21:44:28.000000000 +0200
-+++ firefox-88.0/dom/media/mp4/MP4Demuxer.cpp 2021-04-19 13:36:44.101762211 +0200
+diff -up firefox-99.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-99.0/dom/media/mp4/MP4Demuxer.cpp
+--- firefox-99.0/dom/media/mp4/MP4Demuxer.cpp.1670333 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/mp4/MP4Demuxer.cpp 2022-04-04 09:58:35.606351546 +0200
@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { re
DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \
__func__, ##__VA_ARGS__)
@@ -23,9 +23,9 @@ diff -up firefox-88.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-88.0/dom/medi
if (sample->mKeyframe != keyframe) {
NS_WARNING(nsPrintfCString("Frame incorrectly marked as %skeyframe "
"@ pts:%" PRId64 " dur:%" PRId64
-diff -up firefox-88.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-88.0/dom/media/platforms/PDMFactory.cpp
---- firefox-88.0/dom/media/platforms/PDMFactory.cpp.1670333 2021-04-19 13:36:44.087761790 +0200
-+++ firefox-88.0/dom/media/platforms/PDMFactory.cpp 2021-04-19 13:39:52.676433734 +0200
+diff -up firefox-99.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-99.0/dom/media/platforms/PDMFactory.cpp
+--- firefox-99.0/dom/media/platforms/PDMFactory.cpp.1670333 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/PDMFactory.cpp 2022-04-04 10:09:57.383419125 +0200
@@ -58,6 +58,8 @@
#include <functional>
@@ -35,22 +35,16 @@ diff -up firefox-88.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-88.0/do
namespace mozilla {
#define PDM_INIT_LOG(msg, ...) \
-@@ -572,10 +574,10 @@ void PDMFactory::CreateDefaultPDMs() {
- }
- #endif
+@@ -495,7 +497,7 @@ void PDMFactory::CreateRddPDMs() {
#ifdef MOZ_FFMPEG
-- if (StaticPrefs::media_ffmpeg_enabled() &&
+ if (StaticPrefs::media_ffmpeg_enabled() &&
+ StaticPrefs::media_rdd_ffmpeg_enabled() &&
- !CreateAndStartupPDM<FFmpegRuntimeLinker>()) {
-- mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
-- FFmpegRuntimeLinker::LinkStatusCode());
-+ if (StaticPrefs::media_ffmpeg_enabled()) {
-+ mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>();
-+ if (!mFFmpegUsed) {
-+ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(FFmpegRuntimeLinker::LinkStatusCode()); }
++ !(mFFmpegUsed = CreateAndStartupPDM<FFmpegRuntimeLinker>())) {
+ mFailureFlags += GetFailureFlagBasedOnFFmpegStatus(
+ FFmpegRuntimeLinker::LinkStatusCode());
}
- #endif
- #ifdef MOZ_FFVPX
-@@ -592,8 +594,9 @@ void PDMFactory::CreateDefaultPDMs() {
+@@ -602,8 +604,9 @@ void PDMFactory::CreateDefaultPDMs() {
CreateAndStartupPDM<AgnosticDecoderModule>();
@@ -61,9 +55,9 @@ diff -up firefox-88.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-88.0/do
mFailureFlags += DecoderDoctorDiagnostics::Flags::GMPPDMFailedToStartup;
}
}
-diff -up firefox-88.0/dom/media/platforms/PDMFactory.h.1670333 firefox-88.0/dom/media/platforms/PDMFactory.h
---- firefox-88.0/dom/media/platforms/PDMFactory.h.1670333 2021-04-15 21:44:28.000000000 +0200
-+++ firefox-88.0/dom/media/platforms/PDMFactory.h 2021-04-19 13:36:44.101762211 +0200
+diff -up firefox-99.0/dom/media/platforms/PDMFactory.h.1670333 firefox-99.0/dom/media/platforms/PDMFactory.h
+--- firefox-99.0/dom/media/platforms/PDMFactory.h.1670333 2022-03-31 01:24:44.000000000 +0200
++++ firefox-99.0/dom/media/platforms/PDMFactory.h 2022-04-04 09:58:35.606351546 +0200
@@ -121,6 +121,7 @@ class PDMFactory final {
RefPtr<PlatformDecoderModule> mNullPDM;
diff --git a/pgo.patch b/pgo.patch
index e7e715b..eec103c 100644
--- a/pgo.patch
+++ b/pgo.patch
@@ -1,7 +1,7 @@
-diff -up firefox-96.0/build/moz.configure/lto-pgo.configure.pgo firefox-96.0/build/moz.configure/lto-pgo.configure
---- firefox-96.0/build/moz.configure/lto-pgo.configure.pgo 2022-01-06 19:32:35.000000000 +0100
-+++ firefox-96.0/build/moz.configure/lto-pgo.configure 2022-01-11 15:43:02.193378698 +0100
-@@ -248,8 +248,8 @@ def lto(
+diff -up firefox-99.0/build/moz.configure/lto-pgo.configure.pgo firefox-99.0/build/moz.configure/lto-pgo.configure
+--- firefox-99.0/build/moz.configure/lto-pgo.configure.pgo 2022-03-31 01:24:38.000000000 +0200
++++ firefox-99.0/build/moz.configure/lto-pgo.configure 2022-04-04 10:15:45.387694143 +0200
+@@ -247,8 +247,8 @@ def lto(
cflags.append("-flto")
ldflags.append("-flto")
else:
@@ -12,7 +12,7 @@ diff -up firefox-96.0/build/moz.configure/lto-pgo.configure.pgo firefox-96.0/bui
if target.os == "Android" and value == "cross":
# Work around https://github.com/rust-lang/rust/issues/90088
-@@ -265,7 +265,7 @@ def lto(
+@@ -264,7 +264,7 @@ def lto(
if value == "full":
cflags.append("-flto")
else:
@@ -21,9 +21,9 @@ diff -up firefox-96.0/build/moz.configure/lto-pgo.configure.pgo firefox-96.0/bui
# 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")
-diff -up firefox-96.0/build/pgo/profileserver.py.pgo firefox-96.0/build/pgo/profileserver.py
---- firefox-96.0/build/pgo/profileserver.py.pgo 2022-01-06 16:56:23.000000000 +0100
-+++ firefox-96.0/build/pgo/profileserver.py 2022-01-11 15:43:02.193378698 +0100
+diff -up firefox-99.0/build/pgo/profileserver.py.pgo firefox-99.0/build/pgo/profileserver.py
+--- firefox-99.0/build/pgo/profileserver.py.pgo 2022-03-31 01:24:38.000000000 +0200
++++ firefox-99.0/build/pgo/profileserver.py 2022-04-04 10:15:45.387694143 +0200
@@ -11,7 +11,7 @@ import glob
import subprocess
@@ -70,9 +70,9 @@ diff -up firefox-96.0/build/pgo/profileserver.py.pgo firefox-96.0/build/pgo/prof
llvm_profdata = env.get("LLVM_PROFDATA")
if llvm_profdata:
profraw_files = glob.glob("*.profraw")
-diff -up firefox-96.0/build/unix/mozconfig.unix.pgo firefox-96.0/build/unix/mozconfig.unix
---- firefox-96.0/build/unix/mozconfig.unix.pgo 2022-01-06 16:56:24.000000000 +0100
-+++ firefox-96.0/build/unix/mozconfig.unix 2022-01-11 15:43:02.193378698 +0100
+diff -up firefox-99.0/build/unix/mozconfig.unix.pgo firefox-99.0/build/unix/mozconfig.unix
+--- firefox-99.0/build/unix/mozconfig.unix.pgo 2022-03-31 01:24:38.000000000 +0200
++++ firefox-99.0/build/unix/mozconfig.unix 2022-04-04 10:15:45.387694143 +0200
@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
@@ -89,18 +89,18 @@ diff -up firefox-96.0/build/unix/mozconfig.unix.pgo firefox-96.0/build/unix/mozc
# 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"
-diff -up firefox-96.0/extensions/spellcheck/src/moz.build.pgo firefox-96.0/extensions/spellcheck/src/moz.build
---- firefox-96.0/extensions/spellcheck/src/moz.build.pgo 2022-01-11 15:43:02.193378698 +0100
-+++ firefox-96.0/extensions/spellcheck/src/moz.build 2022-01-11 15:49:52.929362701 +0100
+diff -up firefox-99.0/extensions/spellcheck/src/moz.build.pgo firefox-99.0/extensions/spellcheck/src/moz.build
+--- firefox-99.0/extensions/spellcheck/src/moz.build.pgo 2022-03-31 01:24:50.000000000 +0200
++++ firefox-99.0/extensions/spellcheck/src/moz.build 2022-04-04 10:15:45.387694143 +0200
@@ -28,3 +28,5 @@ EXPORTS.mozilla += [
"mozInlineSpellChecker.h",
"mozSpellChecker.h",
]
+
+CXXFLAGS += ['-fno-devirtualize']
-diff -up firefox-96.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-96.0/toolkit/components/terminator/nsTerminator.cpp
---- firefox-96.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2022-01-06 16:58:15.000000000 +0100
-+++ firefox-96.0/toolkit/components/terminator/nsTerminator.cpp 2022-01-11 15:43:02.193378698 +0100
+diff -up firefox-99.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-99.0/toolkit/components/terminator/nsTerminator.cpp
+--- firefox-99.0/toolkit/components/terminator/nsTerminator.cpp.pgo 2022-04-04 10:15:45.387694143 +0200
++++ firefox-99.0/toolkit/components/terminator/nsTerminator.cpp 2022-04-04 10:19:07.022239556 +0200
@@ -466,6 +466,11 @@ void nsTerminator::StartWatchdog() {
}
#endif
@@ -111,5 +111,5 @@ diff -up firefox-96.0/toolkit/components/terminator/nsTerminator.cpp.pgo firefox
+ crashAfterMS = INT32_MAX;
+
UniquePtr<Options> options(new Options());
- const PRIntervalTime ticksDuration =
- PR_MillisecondsToInterval(HEARTBEAT_INTERVAL_MS);
+ // crashAfterTicks is guaranteed to be > 0 as
+ // crashAfterMS >= ADDITIONAL_WAIT_BEFORE_CRASH_MS >> HEARTBEAT_INTERVAL_MS
bgstack15