Added fix for mozbz#1634213
This commit is contained in:
parent
1f2660d56b
commit
fac8607f93
@ -118,7 +118,7 @@ ExcludeArch: s390x
|
||||
Summary: Mozilla Firefox Web browser
|
||||
Name: firefox
|
||||
Version: 76.0.1
|
||||
Release: 5%{?nss_tag}%{?dist}
|
||||
Release: 6%{?nss_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
|
||||
@ -199,6 +199,7 @@ Patch585: firefox-vaapi-extra-frames.patch
|
||||
Patch586: mozilla-1619882-1.patch
|
||||
Patch587: mozilla-1619882-2.patch
|
||||
Patch588: mozilla-1619882-3.patch
|
||||
Patch589: mozilla-1634213.patch
|
||||
|
||||
# PGO/LTO patches
|
||||
Patch600: pgo.patch
|
||||
@ -415,6 +416,7 @@ This package contains results of tests executed during build.
|
||||
%patch586 -p1 -b .mozilla-1619882-1
|
||||
%patch587 -p1 -b .mozilla-1619882-2
|
||||
%patch588 -p1 -b .mozilla-1619882-3
|
||||
%patch589 -p1 -b .mozilla-1634213
|
||||
|
||||
# PGO patches
|
||||
%patch600 -p1 -b .pgo
|
||||
@ -989,6 +991,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
%changelog
|
||||
* Mon May 25 2020 Martin Stransky <stransky@redhat.com> - 76.0.1-6
|
||||
- Added fix for mozbz#1634213
|
||||
|
||||
* Mon May 25 2020 Martin Stransky <stransky@redhat.com> - 76.0.1-5
|
||||
- Added fix for mozbz#1619882 - video flickering when va-api is used.
|
||||
|
||||
|
96
mozilla-1634213.patch
Normal file
96
mozilla-1634213.patch
Normal file
@ -0,0 +1,96 @@
|
||||
diff --git a/gfx/gl/GLScreenBuffer.cpp b/gfx/gl/GLScreenBuffer.cpp
|
||||
--- a/gfx/gl/GLScreenBuffer.cpp
|
||||
+++ b/gfx/gl/GLScreenBuffer.cpp
|
||||
@@ -88,10 +88,14 @@
|
||||
#if defined(XP_MACOSX)
|
||||
factory = SurfaceFactory_IOSurface::Create(gl, caps, ipcChannel, flags);
|
||||
#elif defined(MOZ_WAYLAND)
|
||||
- if (gl->GetContextType() == GLContextType::EGL) {
|
||||
- if (gfxPlatformGtk::GetPlatform()->UseWaylandDMABufWebGL()) {
|
||||
- factory =
|
||||
- MakeUnique<SurfaceFactory_DMABUF>(gl, caps, ipcChannel, flags);
|
||||
+ if (gl->GetContextType() == GLContextType::EGL &&
|
||||
+ gfxPlatformGtk::GetPlatform()->UseWaylandDMABufWebGL()) {
|
||||
+ auto DMABUFFactory =
|
||||
+ MakeUnique<SurfaceFactory_DMABUF>(gl, caps, ipcChannel, flags);
|
||||
+ if (DMABUFFactory && DMABUFFactory->CanCreateSurface()) {
|
||||
+ factory = std::move(DMABUFFactory);
|
||||
+ } else {
|
||||
+ gfxPlatformGtk::GetPlatform()->DisableWaylandDMABufWebGL();
|
||||
}
|
||||
}
|
||||
#elif defined(MOZ_X11)
|
||||
diff --git a/gfx/gl/SharedSurfaceDMABUF.h b/gfx/gl/SharedSurfaceDMABUF.h
|
||||
--- a/gfx/gl/SharedSurfaceDMABUF.h
|
||||
+++ b/gfx/gl/SharedSurfaceDMABUF.h
|
||||
@@ -71,6 +71,11 @@
|
||||
bool hasAlpha = mReadCaps.alpha;
|
||||
return SharedSurface_DMABUF::Create(mGL, mFormats, size, hasAlpha);
|
||||
}
|
||||
+
|
||||
+ bool CanCreateSurface() {
|
||||
+ UniquePtr<SharedSurface> test = CreateShared(gfx::IntSize(1, 1));
|
||||
+ return test != nullptr;
|
||||
+ }
|
||||
};
|
||||
|
||||
} // namespace gl
|
||||
diff --git a/gfx/thebes/gfxPlatformGtk.h b/gfx/thebes/gfxPlatformGtk.h
|
||||
--- a/gfx/thebes/gfxPlatformGtk.h
|
||||
+++ b/gfx/thebes/gfxPlatformGtk.h
|
||||
@@ -88,7 +88,8 @@
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
bool UseWaylandDMABufTextures();
|
||||
- bool UseWaylandDMABufWebGL();
|
||||
+ bool UseWaylandDMABufWebGL() { return mUseWebGLDmabufBackend; }
|
||||
+ void DisableWaylandDMABufWebGL() { mUseWebGLDmabufBackend = false; }
|
||||
bool UseWaylandHardwareVideoDecoding();
|
||||
#endif
|
||||
|
||||
@@ -110,6 +111,9 @@
|
||||
#ifdef MOZ_X11
|
||||
Display* mCompositorDisplay;
|
||||
#endif
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ bool mUseWebGLDmabufBackend;
|
||||
+#endif
|
||||
};
|
||||
|
||||
#endif /* GFX_PLATFORM_GTK_H */
|
||||
diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
--- a/gfx/thebes/gfxPlatformGtk.cpp
|
||||
+++ b/gfx/thebes/gfxPlatformGtk.cpp
|
||||
@@ -116,6 +116,9 @@
|
||||
|
||||
Factory::ReleaseFTLibrary(gPlatformFTLibrary);
|
||||
gPlatformFTLibrary = nullptr;
|
||||
+
|
||||
+ mUseWebGLDmabufBackend =
|
||||
+ IsWaylandDisplay() && nsWaylandDisplay::IsDMABufWebGLEnabled();
|
||||
}
|
||||
|
||||
void gfxPlatformGtk::FlushContentDrawing() {
|
||||
@@ -725,9 +728,6 @@
|
||||
bool gfxPlatformGtk::UseWaylandDMABufTextures() {
|
||||
return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufTexturesEnabled();
|
||||
}
|
||||
-bool gfxPlatformGtk::UseWaylandDMABufWebGL() {
|
||||
- return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufWebGLEnabled();
|
||||
-}
|
||||
bool gfxPlatformGtk::UseWaylandHardwareVideoDecoding() {
|
||||
return IsWaylandDisplay() && nsWaylandDisplay::IsDMABufVAAPIEnabled() &&
|
||||
gfxPlatform::CanUseHardwareVideoDecoding();
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -9111,7 +9111,7 @@
|
||||
# Use DMABuf backend for WebGL on Wayland.
|
||||
- name: widget.wayland-dmabuf-webgl.enabled
|
||||
type: RelaxedAtomicBool
|
||||
- value: false
|
||||
+ value: true
|
||||
mirror: always
|
||||
|
||||
# Use VA-API for video playback on Wayland.
|
||||
|
Loading…
Reference in New Issue
Block a user