[arch-commits] Commit in mutter/trunk (5 files)

Jan Steffens heftig at archlinux.org
Sat Jan 25 12:30:50 UTC 2020


    Date: Saturday, January 25, 2020 @ 12:30:49
  Author: heftig
Revision: 373913

3.34.3+14+g59e9b073a-1

Added:
  mutter/trunk/0004-background-Scale-monitor_area-after-texture-creation.patch
Modified:
  mutter/trunk/0001-EGL-Include-EGL-eglmesaext.h.patch
  mutter/trunk/0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch
  mutter/trunk/0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch
  mutter/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-EGL-Include-EGL-eglmesaext.h.patch                         |    4 
 0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch |    4 
 0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch |    4 
 0004-background-Scale-monitor_area-after-texture-creation.patch |   80 ++++++++++
 PKGBUILD                                                        |   17 +-
 5 files changed, 97 insertions(+), 12 deletions(-)

Modified: 0001-EGL-Include-EGL-eglmesaext.h.patch
===================================================================
--- 0001-EGL-Include-EGL-eglmesaext.h.patch	2020-01-25 12:07:48 UTC (rev 373912)
+++ 0001-EGL-Include-EGL-eglmesaext.h.patch	2020-01-25 12:30:49 UTC (rev 373913)
@@ -1,7 +1,7 @@
-From f494725ec52f91c9f7cbb1c76cb52beb2a7e35d5 Mon Sep 17 00:00:00 2001
+From 3003ab6efa28cf22486bb44f4786316fca91cb7b Mon Sep 17 00:00:00 2001
 From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
 Date: Sun, 20 Oct 2019 12:04:31 +0200
-Subject: [PATCH 1/3] EGL: Include EGL/eglmesaext.h
+Subject: [PATCH 1/4] EGL: Include EGL/eglmesaext.h
 
 The eglext.h shipped by libglvnd does not include the Mesa extensions,
 unlike the header shipped in Mesa.

Modified: 0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch
===================================================================
--- 0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch	2020-01-25 12:07:48 UTC (rev 373912)
+++ 0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch	2020-01-25 12:30:49 UTC (rev 373913)
@@ -1,7 +1,7 @@
-From a2789eef9adbb8fb5e3ba1c278041996fa69eedc Mon Sep 17 00:00:00 2001
+From 548db532cd12082c2f98913150a5ab8a198f621d Mon Sep 17 00:00:00 2001
 From: Robert Mader <robert.mader at posteo.de>
 Date: Mon, 4 Nov 2019 11:45:13 +0100
-Subject: [PATCH 2/3] surface-actor-wayland: Do not send frame callbacks if the
+Subject: [PATCH 2/4] surface-actor-wayland: Do not send frame callbacks if the
  actor is obscured
 
 `meta_surface_actor_is_obscured` implies that the actor got successfully culled

Modified: 0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch
===================================================================
--- 0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch	2020-01-25 12:07:48 UTC (rev 373912)
+++ 0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch	2020-01-25 12:30:49 UTC (rev 373913)
@@ -1,7 +1,7 @@
-From 722021dc1827bd75a7f4086f0ce55da6b0214a34 Mon Sep 17 00:00:00 2001
+From b5188b0032e9dad1e70030039e813273f866ab0f Mon Sep 17 00:00:00 2001
 From: Robert Mader <robert.mader at posteo.de>
 Date: Wed, 4 Dec 2019 18:54:42 +0100
-Subject: [PATCH 3/3] xwayland: Do not queue frame callbacks unconditionally
+Subject: [PATCH 3/4] xwayland: Do not queue frame callbacks unconditionally
 
 The removed comment is not longer true: XWayland schedules its VSYNC
 from frame callbacks nowadays. Only sending callbacks when the surface

Added: 0004-background-Scale-monitor_area-after-texture-creation.patch
===================================================================
--- 0004-background-Scale-monitor_area-after-texture-creation.patch	                        (rev 0)
+++ 0004-background-Scale-monitor_area-after-texture-creation.patch	2020-01-25 12:30:49 UTC (rev 373913)
@@ -0,0 +1,80 @@
+From d662630a16b28e623ef3769c7ba9c02347f4775e Mon Sep 17 00:00:00 2001
+From: Daniel van Vugt <daniel.van.vugt at canonical.com>
+Date: Mon, 13 Jan 2020 21:02:39 +0800
+Subject: [PATCH 4/4] background: Scale monitor_area after texture creation
+
+Scaling the `monitor_area` before texture creation was just wasting
+megabytes of memory on resolution that the monitor can't display. This
+was also hurting runtime performance.
+
+Example:
+
+  Monitor is natively 1920x1080 and scale set to 3.
+
+  Before: The monitor texture allocated was 5760x3250x4 = 74.6 MB
+  After:  The monitor texture allocated is  1920x1080x4 =  8.3 MB
+
+Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2118
+
+https://gitlab.gnome.org/GNOME/mutter/merge_requests/1004
+---
+ src/compositor/meta-background.c | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
+index 4a1ce0396..886ae3f67 100644
+--- a/src/compositor/meta-background.c
++++ b/src/compositor/meta-background.c
+@@ -20,6 +20,7 @@
+ #include "config.h"
+ 
+ #include "compositor/meta-background-private.h"
++#include "backends/meta-backend-private.h"
+ 
+ #include <string.h>
+ 
+@@ -799,26 +800,35 @@ meta_background_get_texture (MetaBackground         *self,
+     {
+       GError *catch_error = NULL;
+       gboolean bare_region_visible = FALSE;
++      int native_width = monitor_area.width;
++      int native_height = monitor_area.height;
+ 
+-      if (self->style != G_DESKTOP_BACKGROUND_STYLE_WALLPAPER)
++      if (meta_is_stage_views_scaled ())
+         {
+-          monitor_area.x *= monitor_scale;
+-          monitor_area.y *= monitor_scale;
+-          monitor_area.width *= monitor_scale;
+-          monitor_area.height *= monitor_scale;
++          native_width *= monitor_scale;
++          native_height *= monitor_scale;
+         }
+ 
+       if (monitor->texture == NULL)
+         {
+           CoglOffscreen *offscreen;
+ 
+-          monitor->texture = meta_create_texture (monitor_area.width, monitor_area.height,
++          monitor->texture = meta_create_texture (native_width,
++                                                  native_height,
+                                                   COGL_TEXTURE_COMPONENTS_RGBA,
+                                                   META_TEXTURE_FLAGS_NONE);
+           offscreen = cogl_offscreen_new_with_texture (monitor->texture);
+           monitor->fbo = COGL_FRAMEBUFFER (offscreen);
+         }
+ 
++      if (self->style != G_DESKTOP_BACKGROUND_STYLE_WALLPAPER)
++        {
++          monitor_area.x *= monitor_scale;
++          monitor_area.y *= monitor_scale;
++          monitor_area.width *= monitor_scale;
++          monitor_area.height *= monitor_scale;
++        }
++
+       if (!cogl_framebuffer_allocate (monitor->fbo, &catch_error))
+         {
+           /* Texture or framebuffer allocation failed; it's unclear why this happened;
+-- 
+2.24.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-01-25 12:07:48 UTC (rev 373912)
+++ PKGBUILD	2020-01-25 12:30:49 UTC (rev 373913)
@@ -3,7 +3,7 @@
 # Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
 
 pkgname=mutter
-pkgver=3.34.3
+pkgver=3.34.3+14+g59e9b073a
 pkgrel=1
 pkgdesc="A window manager for GNOME"
 url="https://gitlab.gnome.org/GNOME/mutter"
@@ -16,15 +16,17 @@
 checkdepends=(xorg-server-xvfb)
 groups=(gnome)
 install=mutter.install
-_commit=4947e8ae5becc6ff3b2e21c16279b243d8abdd31  # tags/3.34.3^0
+_commit=59e9b073a5bf7bb7eb332b680c573a27bd019249  # gnome-3-34
 source=("git+https://gitlab.gnome.org/GNOME/mutter.git#commit=$_commit"
         0001-EGL-Include-EGL-eglmesaext.h.patch
         0002-surface-actor-wayland-Do-not-send-frame-callbacks-if.patch
-        0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch)
+        0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch
+        0004-background-Scale-monitor_area-after-texture-creation.patch)
 sha256sums=('SKIP'
-            '8440403c1862187b648e3ddd20056666f1a9fea38d0511d7bdf4422ce70b4139'
-            '9f6881cd9fe2031b7119288972d3b921358f387b8cbfbd4c624a0dc33abce8e2'
-            '0ad4084834b6314873d2dc0a9c8bb3b30f0a6106fa44aac98a54129ec0fc0b2c')
+            '6e23ce636916f7d33d05916910cbc97dbe20ca1e8f110cf3f65c95dd5c14962b'
+            'efdd77f91e087f85e6926127a4cc3a7132d4bc75ceb57e239869cbe06a1c67f6'
+            '791090835994c992cfdb0e65f70d2e8983191eda8c4c8f096819f23d916ca1a6'
+            '737dc54c7103a1830a4c4e3cfec44864dc6bce04517511ed796bc9aaaf3958b9')
 
 pkgver() {
   cd $pkgname
@@ -42,6 +44,9 @@
 
   # https://gitlab.gnome.org/GNOME/mutter/merge_requests/956
   git apply -3 ../0003-xwayland-Do-not-queue-frame-callbacks-unconditionall.patch
+
+  # https://gitlab.gnome.org/GNOME/mutter/merge_requests/1004
+  git apply -3 ../0004-background-Scale-monitor_area-after-texture-creation.patch
 }
 
 build() {



More information about the arch-commits mailing list