Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (e814ee60b57f880229d6146568a07f4ce83c9cb8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (e814ee60b57f880229d6146568a07f4ce83c9cb8)
  • Date: Tue, 25 Apr 2023 16:16:15 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/HISTORY
| 3

http/firefox/patches/0032-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
| 116 ++++++++++
http/firefox/patches/0033-bmo-1822747-riscv64-jit-fix.patch
| 80 ++++++

http/firefox/patches/0034-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
| 116 ----------
http/firefox/patches/0035-bmo-1822747-riscv64-jit-fix.patch
| 80 ------
5 files changed, 199 insertions(+), 196 deletions(-)

New commits:
commit e814ee60b57f880229d6146568a07f4ce83c9cb8
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: updated the patches for 112.0.2 again

diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index f00382c..259a759 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,6 @@
+2023-04-25 Pavel Vinogradov <public AT sourcemage.org>
+ * patches/*: updated
+
2023-04-24 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 112.0.2
* patches/*: updated
diff --git
a/http/firefox/patches/0032-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch

b/http/firefox/patches/0032-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
new file mode 100644
index 0000000..0e9642f
--- /dev/null
+++
b/http/firefox/patches/0032-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
@@ -0,0 +1,116 @@
+
+# HG changeset patch
+# User stransky <stransky AT redhat.com>
+# Date 1680176993 0
+# Node ID 1068e0955cfbe594492c5ac032924651eb54c40e
+# Parent 90b165c788cf66a8ff6320ee95dc0af3a65b73be
+Bug 1803016 [Wayland] Don't commit wl_buffer if buffer scale doesn't match
its size r=emilio
+
+Differential Revision: https://phabricator.services.mozilla.com/D173814
+
+diff --git a/widget/gtk/MozContainerWayland.cpp
b/widget/gtk/MozContainerWayland.cpp
+--- a/widget/gtk/MozContainerWayland.cpp
++++ b/widget/gtk/MozContainerWayland.cpp
+@@ -592,16 +592,23 @@ void moz_container_wayland_set_scale_fac
+
+ void moz_container_wayland_set_scale_factor(MozContainer* container) {
+ MutexAutoLock lock(*container->wl_container.container_lock);
+ if (container->wl_container.surface) {
+ moz_container_wayland_set_scale_factor_locked(lock, container);
+ }
+ }
+
++bool moz_container_wayland_size_matches_scale_factor_locked(
++ const MutexAutoLock& aProofOfLock, MozContainer* container, int aWidth,
++ int aHeight) {
++ return aWidth % container->wl_container.buffer_scale == 0 &&
++ aHeight % container->wl_container.buffer_scale == 0;
++}
++
+ static bool moz_container_wayland_surface_create_locked(
+ const MutexAutoLock& aProofOfLock, MozContainer* container) {
+ MozContainerWayland* wl_container = &container->wl_container;
+
+ LOGWAYLAND("%s [%p]\n", __FUNCTION__,
+ (void*)moz_container_get_nsWindow(container));
+
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
+diff --git a/widget/gtk/MozContainerWayland.h
b/widget/gtk/MozContainerWayland.h
+--- a/widget/gtk/MozContainerWayland.h
++++ b/widget/gtk/MozContainerWayland.h
+@@ -80,16 +80,19 @@ gboolean moz_container_wayland_has_egl_w
+ void moz_container_wayland_egl_window_set_size(MozContainer* container,
+ nsIntSize aSize);
+ bool moz_container_wayland_egl_window_needs_size_update(MozContainer*
container,
+ nsIntSize aSize,
+ int scale);
+ void moz_container_wayland_set_scale_factor(MozContainer* container);
+ void moz_container_wayland_set_scale_factor_locked(
+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container);
++bool moz_container_wayland_size_matches_scale_factor_locked(
++ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container,
++ int aWidth, int aHeight);
+
+ void moz_container_wayland_add_initial_draw_callback_locked(
+ MozContainer* container, const std::function<void(void)>&
initial_draw_cb);
+ void moz_container_wayland_add_or_fire_initial_draw_callback(
+ MozContainer* container, const std::function<void(void)>&
initial_draw_cb);
+ void moz_container_wayland_clear_initial_draw_callback(MozContainer*
container);
+
+ wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
+diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
+--- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
++++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
+@@ -280,18 +280,18 @@ void WindowSurfaceWaylandMB::Commit(
+
+ if (!mInProgressBuffer) {
+ // invisible window
+ return;
+ }
+ mFrameInProcess = false;
+
+ MozContainer* container = mWindow->GetMozContainer();
+- MozContainerSurfaceLock lock(container);
+- struct wl_surface* waylandSurface = lock.GetSurface();
++ MozContainerSurfaceLock MozContainerLock(container);
++ struct wl_surface* waylandSurface = MozContainerLock.GetSurface();
+ if (!waylandSurface) {
+ LOGWAYLAND(
+ "WindowSurfaceWaylandMB::Commit [%p] frame queued: can't lock "
+ "wl_surface\n",
+ (void*)mWindow.get());
+ if (!mCallbackRequested) {
+ RefPtr<WindowSurfaceWaylandMB> self(this);
+ moz_container_wayland_add_initial_draw_callback_locked(
+@@ -314,18 +314,29 @@ void WindowSurfaceWaylandMB::Commit(
+ wl_surface_damage(waylandSurface, 0, 0, INT32_MAX, INT32_MAX);
+ } else {
+ for (auto iter = aInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
+ LayoutDeviceIntRect r = iter.Get();
+ wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height);
+ }
+ }
+
++ // aProofOfLock is a kind of substitution of MozContainerSurfaceLock.
++ // MozContainer is locked but MozContainerSurfaceLock doen't convert to
++ // MutexAutoLock& so we use aProofOfLock here.
+ moz_container_wayland_set_scale_factor_locked(aProofOfLock, container);
+- mInProgressBuffer->AttachAndCommit(waylandSurface);
++
++ // It's possible that scale factor changed between Lock() and Commit()
++ // but window size is the same.
++ // Don't attach such buffer as it may have incorrect size,
++ // we'll paint new content soon.
++ if (moz_container_wayland_size_matches_scale_factor_locked(
++ aProofOfLock, container, mWindowSize.width, mWindowSize.height)) {
++ mInProgressBuffer->AttachAndCommit(waylandSurface);
++ }
+
+ mInProgressBuffer->ResetBufferAge();
+ mFrontBuffer = mInProgressBuffer;
+ mFrontBufferInvalidRegion = aInvalidRegion;
+ mInProgressBuffer = nullptr;
+
+ EnforcePoolSizeLimit(aProofOfLock);
+ IncrementBufferAge(aProofOfLock);
+
diff --git a/http/firefox/patches/0033-bmo-1822747-riscv64-jit-fix.patch
b/http/firefox/patches/0033-bmo-1822747-riscv64-jit-fix.patch
new file mode 100644
index 0000000..9a10916
--- /dev/null
+++ b/http/firefox/patches/0033-bmo-1822747-riscv64-jit-fix.patch
@@ -0,0 +1,80 @@
+
+# HG changeset patch
+# User Lu Yahan <yahan AT iscas.ac.cn>
+# Date 1679305236 0
+# Node ID f2cd6873bc2a3f01038ef40cabb3b5d81ab7420f
+# Parent 49e254104e73f10002d85bf3567a16a40fde01b5
+Bug 1822747 - Add a 'pushValue' function in MacroAssembler.r=jandem
+
+Differential Revision: https://phabricator.services.mozilla.com/D172760
+
+diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
+--- a/js/src/jit/moz.build
++++ b/js/src/jit/moz.build
+@@ -225,17 +225,17 @@ elif CONFIG["JS_CODEGEN_LOONG64"]:
+ "loong64/Trampoline-loong64.cpp",
+ ]
+ if CONFIG["JS_SIMULATOR_LOONG64"]:
+ UNIFIED_SOURCES += ["loong64/Simulator-loong64.cpp"]
+ elif CONFIG["JS_CODEGEN_RISCV64"]:
+ UNIFIED_SOURCES += [
+ "riscv64/Architecture-riscv64.cpp",
+ "riscv64/Assembler-riscv64.cpp",
+- "riscv64/AssemblerMatInt.cpp.cpp",
++ "riscv64/AssemblerMatInt.cpp",
+ "riscv64/CodeGenerator-riscv64.cpp",
+ "riscv64/constant/Base-constant-riscv.cpp",
+ "riscv64/disasm/Disasm-riscv64.cpp",
+ "riscv64/extension/base-assembler-riscv.cc",
+ "riscv64/extension/base-riscv-i.cc",
+ "riscv64/extension/extension-riscv-a.cc",
+ "riscv64/extension/extension-riscv-c.cc",
+ "riscv64/extension/extension-riscv-d.cc",
+diff --git a/js/src/jit/riscv64/MacroAssembler-riscv64.h
b/js/src/jit/riscv64/MacroAssembler-riscv64.h
+--- a/js/src/jit/riscv64/MacroAssembler-riscv64.h
++++ b/js/src/jit/riscv64/MacroAssembler-riscv64.h
+@@ -988,16 +988,20 @@ class MacroAssemblerRiscv64Compat : publ
+ }
+ void pushValue(JSValueType type, Register reg) {
+ UseScratchRegisterScope temps(this);
+ Register scratch = temps.Acquire();
+ boxValue(type, reg, scratch);
+ push(scratch);
+ }
+ void pushValue(const Address& addr);
++ void pushValue(const BaseIndex& addr, Register scratch) {
++ loadValue(addr, ValueOperand(scratch));
++ pushValue(ValueOperand(scratch));
++ }
+
+ void handleFailureWithHandlerTail(Label* profilerExitTail,
+ Label* bailoutTail);
+
+ /////////////////////////////////////////////////////////////////
+ // Common interface.
+ /////////////////////////////////////////////////////////////////
+ public:
+diff --git a/js/src/jsapi-tests/testJitMacroAssembler.cpp
b/js/src/jsapi-tests/testJitMacroAssembler.cpp
+--- a/js/src/jsapi-tests/testJitMacroAssembler.cpp
++++ b/js/src/jsapi-tests/testJitMacroAssembler.cpp
+@@ -19,18 +19,17 @@
+ #include "jit/MacroAssembler-inl.h"
+
+ using namespace js;
+ using namespace js::jit;
+
+ using mozilla::NegativeInfinity;
+ using mozilla::PositiveInfinity;
+
+-#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || \
+- defined(JS_CODEGEN_RISCV64s)
++#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
+
+ BEGIN_TEST(testJitMacroAssembler_flexibleDivMod) {
+ TempAllocator tempAlloc(&cx->tempLifoAlloc());
+ JitContext jcx(cx);
+ StackMacroAssembler masm(cx, tempAlloc);
+ AutoCreatedBy acb(masm, __func__);
+
+ PrepareJit(masm);
+
diff --git
a/http/firefox/patches/0034-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch

b/http/firefox/patches/0034-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
deleted file mode 100644
index 0e9642f..0000000
---
a/http/firefox/patches/0034-bmo-1803016-wayland-dont-commit-wl_buffer-if-buffer-scale-doesnt-match.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-
-# HG changeset patch
-# User stransky <stransky AT redhat.com>
-# Date 1680176993 0
-# Node ID 1068e0955cfbe594492c5ac032924651eb54c40e
-# Parent 90b165c788cf66a8ff6320ee95dc0af3a65b73be
-Bug 1803016 [Wayland] Don't commit wl_buffer if buffer scale doesn't match
its size r=emilio
-
-Differential Revision: https://phabricator.services.mozilla.com/D173814
-
-diff --git a/widget/gtk/MozContainerWayland.cpp
b/widget/gtk/MozContainerWayland.cpp
---- a/widget/gtk/MozContainerWayland.cpp
-+++ b/widget/gtk/MozContainerWayland.cpp
-@@ -592,16 +592,23 @@ void moz_container_wayland_set_scale_fac
-
- void moz_container_wayland_set_scale_factor(MozContainer* container) {
- MutexAutoLock lock(*container->wl_container.container_lock);
- if (container->wl_container.surface) {
- moz_container_wayland_set_scale_factor_locked(lock, container);
- }
- }
-
-+bool moz_container_wayland_size_matches_scale_factor_locked(
-+ const MutexAutoLock& aProofOfLock, MozContainer* container, int aWidth,
-+ int aHeight) {
-+ return aWidth % container->wl_container.buffer_scale == 0 &&
-+ aHeight % container->wl_container.buffer_scale == 0;
-+}
-+
- static bool moz_container_wayland_surface_create_locked(
- const MutexAutoLock& aProofOfLock, MozContainer* container) {
- MozContainerWayland* wl_container = &container->wl_container;
-
- LOGWAYLAND("%s [%p]\n", __FUNCTION__,
- (void*)moz_container_get_nsWindow(container));
-
- GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(container));
-diff --git a/widget/gtk/MozContainerWayland.h
b/widget/gtk/MozContainerWayland.h
---- a/widget/gtk/MozContainerWayland.h
-+++ b/widget/gtk/MozContainerWayland.h
-@@ -80,16 +80,19 @@ gboolean moz_container_wayland_has_egl_w
- void moz_container_wayland_egl_window_set_size(MozContainer* container,
- nsIntSize aSize);
- bool moz_container_wayland_egl_window_needs_size_update(MozContainer*
container,
- nsIntSize aSize,
- int scale);
- void moz_container_wayland_set_scale_factor(MozContainer* container);
- void moz_container_wayland_set_scale_factor_locked(
- const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container);
-+bool moz_container_wayland_size_matches_scale_factor_locked(
-+ const mozilla::MutexAutoLock& aProofOfLock, MozContainer* container,
-+ int aWidth, int aHeight);
-
- void moz_container_wayland_add_initial_draw_callback_locked(
- MozContainer* container, const std::function<void(void)>&
initial_draw_cb);
- void moz_container_wayland_add_or_fire_initial_draw_callback(
- MozContainer* container, const std::function<void(void)>&
initial_draw_cb);
- void moz_container_wayland_clear_initial_draw_callback(MozContainer*
container);
-
- wl_surface* moz_gtk_widget_get_wl_surface(GtkWidget* aWidget);
-diff --git a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
---- a/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
-+++ b/widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
-@@ -280,18 +280,18 @@ void WindowSurfaceWaylandMB::Commit(
-
- if (!mInProgressBuffer) {
- // invisible window
- return;
- }
- mFrameInProcess = false;
-
- MozContainer* container = mWindow->GetMozContainer();
-- MozContainerSurfaceLock lock(container);
-- struct wl_surface* waylandSurface = lock.GetSurface();
-+ MozContainerSurfaceLock MozContainerLock(container);
-+ struct wl_surface* waylandSurface = MozContainerLock.GetSurface();
- if (!waylandSurface) {
- LOGWAYLAND(
- "WindowSurfaceWaylandMB::Commit [%p] frame queued: can't lock "
- "wl_surface\n",
- (void*)mWindow.get());
- if (!mCallbackRequested) {
- RefPtr<WindowSurfaceWaylandMB> self(this);
- moz_container_wayland_add_initial_draw_callback_locked(
-@@ -314,18 +314,29 @@ void WindowSurfaceWaylandMB::Commit(
- wl_surface_damage(waylandSurface, 0, 0, INT32_MAX, INT32_MAX);
- } else {
- for (auto iter = aInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
- LayoutDeviceIntRect r = iter.Get();
- wl_surface_damage_buffer(waylandSurface, r.x, r.y, r.width, r.height);
- }
- }
-
-+ // aProofOfLock is a kind of substitution of MozContainerSurfaceLock.
-+ // MozContainer is locked but MozContainerSurfaceLock doen't convert to
-+ // MutexAutoLock& so we use aProofOfLock here.
- moz_container_wayland_set_scale_factor_locked(aProofOfLock, container);
-- mInProgressBuffer->AttachAndCommit(waylandSurface);
-+
-+ // It's possible that scale factor changed between Lock() and Commit()
-+ // but window size is the same.
-+ // Don't attach such buffer as it may have incorrect size,
-+ // we'll paint new content soon.
-+ if (moz_container_wayland_size_matches_scale_factor_locked(
-+ aProofOfLock, container, mWindowSize.width, mWindowSize.height)) {
-+ mInProgressBuffer->AttachAndCommit(waylandSurface);
-+ }
-
- mInProgressBuffer->ResetBufferAge();
- mFrontBuffer = mInProgressBuffer;
- mFrontBufferInvalidRegion = aInvalidRegion;
- mInProgressBuffer = nullptr;
-
- EnforcePoolSizeLimit(aProofOfLock);
- IncrementBufferAge(aProofOfLock);
-
diff --git a/http/firefox/patches/0035-bmo-1822747-riscv64-jit-fix.patch
b/http/firefox/patches/0035-bmo-1822747-riscv64-jit-fix.patch
deleted file mode 100644
index 9a10916..0000000
--- a/http/firefox/patches/0035-bmo-1822747-riscv64-jit-fix.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-
-# HG changeset patch
-# User Lu Yahan <yahan AT iscas.ac.cn>
-# Date 1679305236 0
-# Node ID f2cd6873bc2a3f01038ef40cabb3b5d81ab7420f
-# Parent 49e254104e73f10002d85bf3567a16a40fde01b5
-Bug 1822747 - Add a 'pushValue' function in MacroAssembler.r=jandem
-
-Differential Revision: https://phabricator.services.mozilla.com/D172760
-
-diff --git a/js/src/jit/moz.build b/js/src/jit/moz.build
---- a/js/src/jit/moz.build
-+++ b/js/src/jit/moz.build
-@@ -225,17 +225,17 @@ elif CONFIG["JS_CODEGEN_LOONG64"]:
- "loong64/Trampoline-loong64.cpp",
- ]
- if CONFIG["JS_SIMULATOR_LOONG64"]:
- UNIFIED_SOURCES += ["loong64/Simulator-loong64.cpp"]
- elif CONFIG["JS_CODEGEN_RISCV64"]:
- UNIFIED_SOURCES += [
- "riscv64/Architecture-riscv64.cpp",
- "riscv64/Assembler-riscv64.cpp",
-- "riscv64/AssemblerMatInt.cpp.cpp",
-+ "riscv64/AssemblerMatInt.cpp",
- "riscv64/CodeGenerator-riscv64.cpp",
- "riscv64/constant/Base-constant-riscv.cpp",
- "riscv64/disasm/Disasm-riscv64.cpp",
- "riscv64/extension/base-assembler-riscv.cc",
- "riscv64/extension/base-riscv-i.cc",
- "riscv64/extension/extension-riscv-a.cc",
- "riscv64/extension/extension-riscv-c.cc",
- "riscv64/extension/extension-riscv-d.cc",
-diff --git a/js/src/jit/riscv64/MacroAssembler-riscv64.h
b/js/src/jit/riscv64/MacroAssembler-riscv64.h
---- a/js/src/jit/riscv64/MacroAssembler-riscv64.h
-+++ b/js/src/jit/riscv64/MacroAssembler-riscv64.h
-@@ -988,16 +988,20 @@ class MacroAssemblerRiscv64Compat : publ
- }
- void pushValue(JSValueType type, Register reg) {
- UseScratchRegisterScope temps(this);
- Register scratch = temps.Acquire();
- boxValue(type, reg, scratch);
- push(scratch);
- }
- void pushValue(const Address& addr);
-+ void pushValue(const BaseIndex& addr, Register scratch) {
-+ loadValue(addr, ValueOperand(scratch));
-+ pushValue(ValueOperand(scratch));
-+ }
-
- void handleFailureWithHandlerTail(Label* profilerExitTail,
- Label* bailoutTail);
-
- /////////////////////////////////////////////////////////////////
- // Common interface.
- /////////////////////////////////////////////////////////////////
- public:
-diff --git a/js/src/jsapi-tests/testJitMacroAssembler.cpp
b/js/src/jsapi-tests/testJitMacroAssembler.cpp
---- a/js/src/jsapi-tests/testJitMacroAssembler.cpp
-+++ b/js/src/jsapi-tests/testJitMacroAssembler.cpp
-@@ -19,18 +19,17 @@
- #include "jit/MacroAssembler-inl.h"
-
- using namespace js;
- using namespace js::jit;
-
- using mozilla::NegativeInfinity;
- using mozilla::PositiveInfinity;
-
--#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || \
-- defined(JS_CODEGEN_RISCV64s)
-+#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
-
- BEGIN_TEST(testJitMacroAssembler_flexibleDivMod) {
- TempAllocator tempAlloc(&cx->tempLifoAlloc());
- JitContext jcx(cx);
- StackMacroAssembler masm(cx, tempAlloc);
- AutoCreatedBy acb(masm, __func__);
-
- PrepareJit(masm);
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (e814ee60b57f880229d6146568a07f4ce83c9cb8), Pavel Vinogradov, 04/25/2023

Archive powered by MHonArc 2.6.24.

Top of Page