1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

www/cliqz: Removes some of the obsolete patches.

This commit is contained in:
Santhosh Raju 2020-05-17 18:24:32 +00:00
parent 995ec71c5d
commit 418dcf0021
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535566
3 changed files with 0 additions and 345 deletions

View File

@ -1,212 +0,0 @@
Taken from www/firefox
commit f30e2a9e31fa
Author: Martin Stransky <stransky@redhat.com>
Date: Thu Mar 26 12:12:40 2020 +0000
Bug 1612377 [Wayland] Remove moz_container_set_accelerated(), r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D68351
--HG--
extra : moz-landing-system : lando
---
widget/gtk/mozcontainer.cpp | 7 +------
widget/gtk/mozcontainer.h | 2 --
widget/gtk/nsWindow.cpp | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
index 0c3833bc8ce3e..d438b67f9baea 100644
--- mozilla-release/widget/gtk/mozcontainer.cpp
+++ mozilla-release/widget/gtk/mozcontainer.cpp
@@ -230,7 +230,6 @@ void moz_container_init(MozContainer* container) {
container->subsurface_dy = 0;
container->surface_position_needs_update = 0;
container->initial_draw_cbs.clear();
- container->is_accelerated = false;
#endif
LOG(("%s [%p]\n", __FUNCTION__, (void*)container));
@@ -694,14 +693,10 @@ void moz_container_update_opaque_region(MozContainer* container,
// When GL compositor / WebRender is used,
// moz_container_get_wl_egl_window() is called only once when window
// is created or resized so update opaque region now.
- if (container->is_accelerated) {
+ if (moz_container_has_wl_egl_window(container)) {
moz_container_set_opaque_region(container);
}
}
-
-void moz_container_set_accelerated(MozContainer* container) {
- container->is_accelerated = true;
-}
#endif
void moz_container_force_default_visual(MozContainer* container) {
diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
index 6befb992515dc..885dce5c27a1a 100644
--- mozilla-release/widget/gtk/mozcontainer.h
+++ mozilla-release/widget/gtk/mozcontainer.h
@@ -87,7 +87,6 @@ struct _MozContainer {
gboolean surface_needs_clear;
gboolean ready_to_draw;
std::vector<std::function<void(void)>> initial_draw_cbs;
- gboolean is_accelerated;
#endif
gboolean force_default_visual;
};
@@ -121,7 +120,6 @@ wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
void moz_container_update_opaque_region(MozContainer* container,
bool aSubtractCorners,
bool aFullScreen);
-void moz_container_set_accelerated(MozContainer* container);
#endif
#endif /* __MOZ_CONTAINER_H__ */
diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
index 728c1ed7d3226..dbcd8b8ae4941 100644
--- mozilla-release/widget/gtk/nsWindow.cpp
+++ mozilla-release/widget/gtk/nsWindow.cpp
@@ -4138,7 +4138,6 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
self->mNeedsCompositorResume = true;
self->MaybeResumeCompositor();
});
- moz_container_set_accelerated(mContainer);
}
#endif
commit 4d1730dd79f9
Author: Martin Stransky <stransky@redhat.com>
Date: Thu Mar 26 12:12:48 2020 +0000
Bug 1612377 [Wayland] Update opaque region and widget scale factor when screen DPI changes, r=jhorak
- Integrate scale factor setup to moz_container_get_wl_surface() and don't call it explicitly.
- No need to set it explicitly at nsWindow::GetWaylandSurface().
- Update client offset when scale changes in CSD mode by UpdateClientOffsetFromCSDWindow().
- Update scale factor/opaque region on EGL immediately.
Differential Revision: https://phabricator.services.mozilla.com/D68352
--HG--
extra : moz-landing-system : lando
---
widget/gtk/mozcontainer.cpp | 19 ++++++++++++++++++-
widget/gtk/mozcontainer.h | 3 +--
widget/gtk/nsWindow.cpp | 29 ++++++++++++++++++++++-------
3 files changed, 41 insertions(+), 10 deletions(-)
diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
index d438b67f9baea..eff25264d5678 100644
--- mozilla-release/widget/gtk/mozcontainer.cpp
+++ mozilla-release/widget/gtk/mozcontainer.cpp
@@ -595,6 +595,22 @@ static void moz_container_set_opaque_region(MozContainer* container) {
container->opaque_region_needs_update = false;
}
+static int moz_gtk_widget_get_scale_factor(MozContainer* container) {
+ static auto sGtkWidgetGetScaleFactor =
+ (gint(*)(GtkWidget*))dlsym(RTLD_DEFAULT, "gtk_widget_get_scale_factor");
+ return sGtkWidgetGetScaleFactor
+ ? sGtkWidgetGetScaleFactor(GTK_WIDGET(container))
+ : 1;
+}
+
+void moz_container_set_scale_factor(MozContainer* container) {
+ if (!container->surface) {
+ return;
+ }
+ wl_surface_set_buffer_scale(container->surface,
+ moz_gtk_widget_get_scale_factor(container));
+}
+
struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
LOGWAYLAND(("%s [%p] surface %p ready_to_draw %d\n", __FUNCTION__,
(void*)container, (void*)container->surface,
@@ -645,6 +661,8 @@ struct wl_surface* moz_container_get_wl_surface(MozContainer* container) {
}
moz_container_set_opaque_region(container);
+ moz_container_set_scale_factor(container);
+
return container->surface;
}
@@ -659,7 +677,6 @@ struct wl_egl_window* moz_container_get_wl_egl_window(MozContainer* container,
if (!surface) {
return nullptr;
}
- wl_surface_set_buffer_scale(surface, scale);
if (!container->eglwindow) {
GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
container->eglwindow =
diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
index 885dce5c27a1a..8d40560cf634b 100644
--- mozilla-release/widget/gtk/mozcontainer.h
+++ mozilla-release/widget/gtk/mozcontainer.h
@@ -112,8 +112,7 @@ void moz_container_move_resize(MozContainer* container, int dx, int dy,
int width, int height);
void moz_container_egl_window_set_size(MozContainer* container, int width,
int height);
-void moz_container_scale_changed(MozContainer* container,
- GtkAllocation* aAllocation);
+void moz_container_set_scale_factor(MozContainer* container);
void moz_container_add_initial_draw_callback(
MozContainer* container, const std::function<void(void)>& initial_draw_cb);
wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
index dbcd8b8ae4941..be9c29a02ba32 100644
--- mozilla-release/widget/gtk/nsWindow.cpp
+++ mozilla-release/widget/gtk/nsWindow.cpp
@@ -2713,7 +2713,7 @@ gboolean nsWindow::OnConfigureEvent(GtkWidget* aWidget,
OnSizeAllocate(&allocation);
}
- // Client offset are upated by _NET_FRAME_EXTENTS on X11 when system titlebar
+ // Client offset are updated by _NET_FRAME_EXTENTS on X11 when system titlebar
// is enabled. In ither cases (Wayland or system titlebar is off on X11)
// we don't get _NET_FRAME_EXTENTS X11 property notification so we derive
// it from mContainer position.
@@ -3689,6 +3689,26 @@ void nsWindow::OnScaleChanged(GtkAllocation* aAllocation) {
// configure_event is already fired before scale-factor signal,
// but size-allocate isn't fired by changing scale
OnSizeAllocate(aAllocation);
+
+ // Client offset are updated by _NET_FRAME_EXTENTS on X11 when system titlebar
+ // is enabled. In ither cases (Wayland or system titlebar is off on X11)
+ // we don't get _NET_FRAME_EXTENTS X11 property notification so we derive
+ // it from mContainer position.
+ if (mCSDSupportLevel == CSD_SUPPORT_CLIENT) {
+ if (!mIsX11Display || (mIsX11Display && mDrawInTitlebar)) {
+ UpdateClientOffsetFromCSDWindow();
+ }
+ }
+
+#ifdef MOZ_WAYLAND
+ // We need to update scale and opaque region when scale of egl window
+ // is changed.
+ if (mContainer && moz_container_has_wl_egl_window(mContainer)) {
+ moz_container_set_scale_factor(mContainer);
+ LayoutDeviceIntRegion tmpRegion;
+ UpdateOpaqueRegion(tmpRegion);
+ }
+#endif
}
void nsWindow::DispatchDragEvent(EventMessage aMsg,
@@ -7618,12 +7638,7 @@ void nsWindow::GetCompositorWidgetInitData(
#ifdef MOZ_WAYLAND
wl_surface* nsWindow::GetWaylandSurface() {
if (mContainer) {
- struct wl_surface* surface =
- moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
- if (surface != NULL) {
- wl_surface_set_buffer_scale(surface, GdkScaleFactor());
- }
- return surface;
+ return moz_container_get_wl_surface(MOZ_CONTAINER(mContainer));
}
NS_WARNING(

View File

@ -1,103 +0,0 @@
Taken from www/firefox
commit 7f9b73f61241
Author: Martin Stransky <stransky@redhat.com>
Date: Wed Mar 18 07:01:27 2020 +0000
Bug 1619258 [Wayland] Enable VA-API for all formats, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D65536
--HG--
extra : moz-landing-system : lando
---
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 30 ++++++++++++++---------
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h | 1 +
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
index 9a71a681eaef5..e0f7504574d6c 100644
--- mozilla-release/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ mozilla-release/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -42,6 +42,9 @@ typedef int VAStatus;
# define VA_STATUS_SUCCESS 0x00000000
#endif
+// Use some extra HW frames for potential rendering lags.
+#define EXTRA_HW_FRAMES 6
+
typedef mozilla::layers::Image Image;
typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage;
@@ -135,10 +138,6 @@ VAAPIFrameHolder::~VAAPIFrameHolder() {
}
AVCodec* FFmpegVideoDecoder<LIBAV_VER>::FindVAAPICodec() {
- if (mCodecID != AV_CODEC_ID_H264) {
- return nullptr;
- }
-
AVCodec* decoder = mLib->avcodec_find_decoder(mCodecID);
for (int i = 0;; i++) {
const AVCodecHWConfig* config = mLib->avcodec_get_hw_config(decoder, i);
@@ -172,7 +171,6 @@ bool FFmpegVideoDecoder<LIBAV_VER>::CreateVAAPIDeviceContext() {
MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {
FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
- MOZ_ASSERT(mCodecID == AV_CODEC_ID_H264);
if (!mLib->IsVAAPIAvailable()) {
FFMPEG_LOG("libva library is missing");
@@ -282,11 +280,9 @@ RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init() {
MediaResult rv;
#ifdef MOZ_WAYLAND_USE_VAAPI
- if (mCodecID == AV_CODEC_ID_H264) {
- rv = InitVAAPIDecoder();
- if (NS_SUCCEEDED(rv)) {
- return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
- }
+ rv = InitVAAPIDecoder();
+ if (NS_SUCCEEDED(rv)) {
+ return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
}
#endif
@@ -338,7 +334,12 @@ void FFmpegVideoDecoder<LIBAV_VER>::InitVAAPICodecContext() {
mCodecContext->height = mInfo.mImage.height;
mCodecContext->thread_count = 1;
mCodecContext->get_format = ChooseVAAPIPixelFormat;
- mCodecContext->extra_hw_frames = H264::ComputeMaxRefFrames(mInfo.mExtraData);
+ if (mCodecID == AV_CODEC_ID_H264) {
+ mCodecContext->extra_hw_frames =
+ H264::ComputeMaxRefFrames(mInfo.mExtraData);
+ } else {
+ mCodecContext->extra_hw_frames = EXTRA_HW_FRAMES;
+ }
}
#endif
@@ -697,4 +698,11 @@ void FFmpegVideoDecoder<LIBAV_VER>::ProcessShutdown() {
FFmpegDataDecoder<LIBAV_VER>::ProcessShutdown();
}
+#ifdef MOZ_WAYLAND_USE_VAAPI
+bool FFmpegVideoDecoder<LIBAV_VER>::IsHardwareAccelerated(
+ nsACString& aFailureReason) const {
+ return !!mVAAPIDeviceContext;
+}
+#endif
+
} // namespace mozilla
diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
index 6158f7bc2f6dd..670cb6203dde0 100644
--- mozilla-release/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
+++ mozilla-release/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h
@@ -92,6 +92,7 @@ class FFmpegVideoDecoder<LIBAV_VER>
bool CreateVAAPIDeviceContext();
void InitVAAPICodecContext();
AVCodec* FindVAAPICodec();
+ bool IsHardwareAccelerated(nsACString& aFailureReason) const override;
MediaResult CreateImageVAAPI(int64_t aOffset, int64_t aPts, int64_t aDuration,
MediaDataDecoder::DecodedData& aResults);

View File

@ -1,30 +0,0 @@
Silence Service.profiler errors on Tier3 after bug 1613390
Taken from www/firefox.
diff --git browser/components/BrowserGlue.jsm browser/components/BrowserGlue.jsm
index 8f86bf0584a99..2ce53c6921d15 100644
--- mozilla-release/browser/components/BrowserGlue.jsm
+++ mozilla-release/browser/components/BrowserGlue.jsm
@@ -2300,7 +2300,9 @@ BrowserGlue.prototype = {
ChromeUtils.idleDispatch(
() => {
if (!Services.startup.shuttingDown) {
- Services.profiler.AddMarker("startupIdleTask");
+ if (Services.profiler) {
+ Services.profiler.AddMarker("startupIdleTask");
+ }
try {
task.task();
} catch (ex) {
@@ -2371,7 +2373,9 @@ BrowserGlue.prototype = {
for (let task of idleTasks) {
ChromeUtils.idleDispatch(() => {
if (!Services.startup.shuttingDown) {
- Services.profiler.AddMarker("startupLateIdleTask");
+ if (Services.profiler) {
+ Services.profiler.AddMarker("startupLateIdleTask");
+ }
try {
task();
} catch (ex) {