Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package swaybg for openSUSE:Factory checked in at 2022-03-10 22:45:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/swaybg (Old) and /work/SRC/openSUSE:Factory/.swaybg.new.2349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "swaybg" Thu Mar 10 22:45:19 2022 rev:4 rq:960698 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/swaybg/swaybg.changes 2021-07-20 15:40:19.745565204 +0200 +++ /work/SRC/openSUSE:Factory/.swaybg.new.2349/swaybg.changes 2022-03-11 11:36:26.890280085 +0100 @@ -1,0 +2,8 @@ +Thu Mar 10 09:54:51 UTC 2022 - Michael Vetter <mvet...@suse.com> + +- Update to 1.1.1: + * Add editorconfig + * Only render a new frame when the buffer size changes + * Fix memory leak when using image tile mode + +------------------------------------------------------------------- Old: ---- swaybg-1.1.tar.gz New: ---- swaybg-1.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ swaybg.spec ++++++ --- /var/tmp/diff_new_pack.jiFM5Q/_old 2022-03-11 11:36:27.290280554 +0100 +++ /var/tmp/diff_new_pack.jiFM5Q/_new 2022-03-11 11:36:27.298280563 +0100 @@ -1,7 +1,7 @@ # # spec file for package swaybg # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: swaybg -Version: 1.1 +Version: 1.1.1 Release: 0 Summary: Wallpaper tool for Wayland compositors License: MIT ++++++ swaybg-1.1.tar.gz -> swaybg-1.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swaybg-1.1/.editorconfig new/swaybg-1.1.1/.editorconfig --- old/swaybg-1.1/.editorconfig 1970-01-01 01:00:00.000000000 +0100 +++ new/swaybg-1.1.1/.editorconfig 2022-03-10 10:23:40.000000000 +0100 @@ -0,0 +1,22 @@ +# For the full list of code style requirements, see sway's CONTRIBUTING.md + +root = true + +[*] +charset = utf-8 +end_of_line = lf + +[*.{c,h,cmake,txt}] +indent_style = tab +indent_size = 4 + +[*.{xml,yml}] +indent_style = space +indent_size = 2 + +[config] +indent_style = space +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swaybg-1.1/background-image.c new/swaybg-1.1.1/background-image.c --- old/swaybg-1.1/background-image.c 2021-07-19 13:27:09.000000000 +0200 +++ new/swaybg-1.1.1/background-image.c 2022-03-10 10:23:40.000000000 +0100 @@ -108,6 +108,7 @@ cairo_pattern_t *pattern = cairo_pattern_create_for_surface(image); cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT); cairo_set_source(cairo, pattern); + cairo_pattern_destroy(pattern); break; } case BACKGROUND_MODE_SOLID_COLOR: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swaybg-1.1/main.c new/swaybg-1.1.1/main.c --- old/swaybg-1.1/main.c 2021-07-19 13:27:09.000000000 +0200 +++ new/swaybg-1.1.1/main.c 2022-03-10 10:23:40.000000000 +0100 @@ -78,6 +78,7 @@ uint32_t configure_serial; bool dirty, needs_ack; + int32_t committed_width, committed_height, committed_scale; struct wl_list link; }; @@ -103,6 +104,19 @@ static void render_frame(struct swaybg_output *output, cairo_surface_t *surface) { int buffer_width = output->width * output->scale, buffer_height = output->height * output->scale; + + // If the last committed buffer has the same size as this one would, do + // not render a new buffer, because it will be identical to the old one + if (output->committed_width == buffer_width && + output->committed_height == buffer_height) { + if (output->committed_scale != output->scale) { + wl_surface_set_buffer_scale(output->surface, output->scale); + wl_surface_commit(output->surface); + + output->committed_scale = output->scale; + } + return; + } struct pool_buffer buffer; if (!create_buffer(&buffer, output->state->shm, buffer_width, buffer_height, WL_SHM_FORMAT_ARGB8888)) { @@ -133,6 +147,11 @@ wl_surface_attach(output->surface, buffer.buffer, 0, 0); wl_surface_damage_buffer(output->surface, 0, 0, INT32_MAX, INT32_MAX); wl_surface_commit(output->surface); + + output->committed_width = buffer_width; + output->committed_height = buffer_height; + output->committed_scale = output->scale; + // we will not reuse the buffer, so destroy it immediately destroy_buffer(&buffer); } @@ -580,7 +599,12 @@ output->configure_serial); } - if (output->dirty && output->config->image) { + int buffer_width = output->width * output->scale, + buffer_height = output->height * output->scale; + bool buffer_change = + output->committed_height != buffer_height || + output->committed_width != buffer_width; + if (output->dirty && output->config->image && buffer_change) { output->config->image->load_required = true; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/swaybg-1.1/meson.build new/swaybg-1.1.1/meson.build --- old/swaybg-1.1/meson.build 2021-07-19 13:27:09.000000000 +0200 +++ new/swaybg-1.1.1/meson.build 2022-03-10 10:23:40.000000000 +0100 @@ -1,7 +1,7 @@ project( 'swaybg', 'c', - version: '1.1', + version: '1.1.1', license: 'MIT', meson_version: '>=0.48.0', default_options: [ @@ -37,8 +37,8 @@ version = '"@0@"'.format(meson.project_version()) if git.found() - git_commit_hash = run_command([git, 'describe', '--always', '--tags']) - git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD']) + git_commit_hash = run_command([git, 'describe', '--always', '--tags'], check: false) + git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false) if git_commit_hash.returncode() == 0 and git_branch.returncode() == 0 version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash.stdout().strip(), git_branch.stdout().strip()) endif