Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libshumate for openSUSE:Factory checked in at 2023-07-14 15:35:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libshumate (Old) and /work/SRC/openSUSE:Factory/.libshumate.new.3193 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libshumate" Fri Jul 14 15:35:35 2023 rev:6 rq:1098270 version:1.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/libshumate/libshumate.changes 2022-12-04 14:58:23.248281711 +0100 +++ /work/SRC/openSUSE:Factory/.libshumate.new.3193/libshumate.changes 2023-07-14 15:35:37.077928012 +0200 @@ -1,0 +2,6 @@ +Tue Jul 11 12:13:01 UTC 2023 - Bjørn Lie <bjorn....@gmail.com> + +- Update to version 1.0.4: + + Throttle tile download during animations. + +------------------------------------------------------------------- Old: ---- libshumate-1.0.3.obscpio New: ---- libshumate-1.0.4.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libshumate.spec ++++++ --- /var/tmp/diff_new_pack.ukKNB9/_old 2023-07-14 15:35:37.881932689 +0200 +++ /var/tmp/diff_new_pack.ukKNB9/_new 2023-07-14 15:35:37.889932735 +0200 @@ -1,7 +1,7 @@ # # spec file for package libshumate # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ %define soname libshumate-%{somajor}_%{sominor}-1 Name: libshumate -Version: 1.0.3 +Version: 1.0.4 Release: 0 Summary: C library providing a GtkWidget to display maps License: LGPL-2.1-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ukKNB9/_old 2023-07-14 15:35:37.917932899 +0200 +++ /var/tmp/diff_new_pack.ukKNB9/_new 2023-07-14 15:35:37.921932921 +0200 @@ -4,7 +4,7 @@ <param name="url">https://gitlab.gnome.org/GNOME/libshumate.git</param> <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> - <param name="revision">refs/tags/1.0.3</param> + <param name="revision">refs/tags/1.0.4</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> </service> ++++++ libshumate-1.0.3.obscpio -> libshumate-1.0.4.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/NEWS new/libshumate-1.0.4/NEWS --- old/libshumate-1.0.3/NEWS 2022-12-01 21:30:44.000000000 +0100 +++ new/libshumate-1.0.4/NEWS 2023-07-08 23:12:59.000000000 +0200 @@ -1,4 +1,9 @@ ===================== +Version 1.0.4 +===================== + - Throttle tile download during animations + +===================== Version 1.0.3 ===================== - Fix memory leaks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/meson.build new/libshumate-1.0.4/meson.build --- old/libshumate-1.0.3/meson.build 2022-12-01 21:30:44.000000000 +0100 +++ new/libshumate-1.0.4/meson.build 2023-07-08 23:12:59.000000000 +0200 @@ -1,6 +1,6 @@ project( 'libshumate', 'c', - version: '1.0.3', + version: '1.0.4', license: 'LGPLv2.1+', meson_version: '>= 0.53.0', default_options: [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/po/LINGUAS new/libshumate-1.0.4/po/LINGUAS --- old/libshumate-1.0.3/po/LINGUAS 2022-12-01 21:30:44.000000000 +0100 +++ new/libshumate-1.0.4/po/LINGUAS 2023-07-08 23:12:59.000000000 +0200 @@ -1,11 +1,13 @@ # please keep this list sorted alphabetically # ab +be bg ca cs da de +el es eu fa @@ -30,6 +32,7 @@ pt pt_BR ru +sk sl sr sv diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/po/be.po new/libshumate-1.0.4/po/be.po --- old/libshumate-1.0.3/po/be.po 1970-01-01 01:00:00.000000000 +0100 +++ new/libshumate-1.0.4/po/be.po 2023-07-08 23:12:59.000000000 +0200 @@ -0,0 +1,47 @@ +# Belarusian translation for libshumate. +# Copyright (C) 2022 libshumate's COPYRIGHT HOLDER +# This file is distributed under the same license as the libshumate package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: libshumate main\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libshumate/issues\n" +"POT-Creation-Date: 2023-05-05 13:38+0000\n" +"PO-Revision-Date: 2023-05-08 13:19+0300\n" +"Last-Translator: Yuras Shumovich <shumovi...@gmail.com>\n" +"Language-Team: Belarusian <i18n-bel-gn...@googlegroups.com>\n" +"Language: be\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 3.2.2\n" + +#. m is the unit for meters +#: shumate/shumate-scale.c:197 +#, c-format +msgid "%d m" +msgstr "%d м" + +#. km is the unit for kilometers +#: shumate/shumate-scale.c:200 +#, c-format +msgid "%d km" +msgstr "%d км" + +# ÑÑкÑÑеÑÑа Ñ "Ð ÑÑка-белаÑÑÑÐºÑ ÑлоÑнÑк ÑкаÑаÑÑннÑÑ Ñ 2 ÑÐ°Ð¼Ð°Ñ " Т. 2, Ñ. 446 +# ISBN 5-343-00449-0 +#. ft is the unit for feet +#: shumate/shumate-scale.c:206 +#, c-format +msgid "%d ft" +msgstr "%d Ñ." + +# ÐÑдзе не ÑÑкÑÑеÑÑа Ñ Ð°Ð³ÑлÑнапÑÑнÑÑага ÑкаÑаÑÑÐ½Ð½Ñ Ð½Ðµ ÑÑнÑе. СкаÑаÑÑнне "м." можна паблÑÑаÑÑ Ð· "меÑÑ", а на галоÑнÑÑ ÑкаÑаÑаÑÑ Ð½ÐµÐ»Ñга. +#. mi is the unit for miles +#: shumate/shumate-scale.c:209 +#, c-format +msgid "%d mi" +msgstr "%d мÑл." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/po/el.po new/libshumate-1.0.4/po/el.po --- old/libshumate-1.0.3/po/el.po 1970-01-01 01:00:00.000000000 +0100 +++ new/libshumate-1.0.4/po/el.po 2023-07-08 23:12:59.000000000 +0200 @@ -0,0 +1,43 @@ +# Greek translation for libshumate. +# Copyright (C) 2023 libshumate's COPYRIGHT HOLDER +# This file is distributed under the same license as the libshumate package. +# Efstathios Iosifidis <eiosifi...@gnome.org>, 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: libshumate libshumate-1-0\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libshumate/issues\n" +"POT-Creation-Date: 2023-06-12 13:19+0000\n" +"PO-Revision-Date: 2023-07-03 11:18+0300\n" +"Last-Translator: Efstathios Iosifidis <eiosifi...@gnome.org>\n" +"Language-Team: Greek <gnome-el-l...@gnome.org>\n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.3.1\n" + +#. m is the unit for meters +#: shumate/shumate-scale.c:197 +#, c-format +msgid "%d m" +msgstr "%d μ" + +#. km is the unit for kilometers +#: shumate/shumate-scale.c:200 +#, c-format +msgid "%d km" +msgstr "%d Ïλμ" + +#. ft is the unit for feet +#: shumate/shumate-scale.c:206 +#, c-format +msgid "%d ft" +msgstr "%d ft" + +#. mi is the unit for miles +#: shumate/shumate-scale.c:209 +#, c-format +msgid "%d mi" +msgstr "%d mi" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/po/sk.po new/libshumate-1.0.4/po/sk.po --- old/libshumate-1.0.3/po/sk.po 1970-01-01 01:00:00.000000000 +0100 +++ new/libshumate-1.0.4/po/sk.po 2023-07-08 23:12:59.000000000 +0200 @@ -0,0 +1,43 @@ +# Slovak translation for libshumate. +# Copyright (C) 2023 libshumate's COPYRIGHT HOLDER +# This file is distributed under the same license as the libshumate package. +# DuÅ¡an Kazik <prescot...@gmail.com>, 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: libshumate libshumate-1-0\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libshumate/issues\n" +"POT-Creation-Date: 2023-05-08 10:20+0000\n" +"PO-Revision-Date: 2023-06-12 09:18-0400\n" +"Last-Translator: DuÅ¡an Kazik <prescot...@gmail.com>\n" +"Language-Team: Slovak <gnome-sk-l...@gnome.org>\n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n" +"X-Generator: Poedit 3.3.1\n" + +#. m is the unit for meters +#: shumate/shumate-scale.c:197 +#, c-format +msgid "%d m" +msgstr "%d m" + +#. km is the unit for kilometers +#: shumate/shumate-scale.c:200 +#, c-format +msgid "%d km" +msgstr "%d km" + +#. ft is the unit for feet +#: shumate/shumate-scale.c:206 +#, c-format +msgid "%d ft" +msgstr "%d ft" + +#. mi is the unit for miles +#: shumate/shumate-scale.c:209 +#, c-format +msgid "%d mi" +msgstr "%d mi" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/shumate/shumate-map-layer.c new/libshumate-1.0.4/shumate/shumate-map-layer.c --- old/libshumate-1.0.3/shumate/shumate-map-layer.c 2022-12-01 21:30:44.000000000 +0100 +++ new/libshumate-1.0.4/shumate/shumate-map-layer.c 2023-07-08 23:12:59.000000000 +0200 @@ -47,6 +47,14 @@ ShumateMemoryCache *memcache; + gint64 profile_all_tiles_filled_begin; + gint64 profile_all_tiles_done_begin; + + guint defer_callback_id; + double defer_latitude_y, defer_longitude_x, defer_zoom_level; + gint64 defer_frame_time; + gboolean deferring; + #ifdef SHUMATE_HAS_VECTOR_RENDERER ShumateVectorSymbolContainer *symbols; #endif @@ -251,6 +259,68 @@ g_signal_handlers_disconnect_by_func (tile, on_tile_notify_state, self); } +static gboolean +defer_tick_callback (GtkWidget *widget, + GdkFrameClock *frame_clock, + gpointer user_data) +{ + ShumateMapLayer *self = SHUMATE_MAP_LAYER (widget); + self->defer_callback_id = 0; + + recompute_grid (self); + return G_SOURCE_REMOVE; +} + +static gboolean +should_defer (ShumateMapLayer *self) +{ + /* If the map is moving quickly, we may defer loading tiles until it slows back + down. That way, we don't waste resources loading tiles that will likely be gone + before they are done loading. */ + + ShumateViewport *viewport = shumate_layer_get_viewport (SHUMATE_LAYER (self)); + ShumateMapSource *map_source = self->map_source; + double zoom_level = shumate_viewport_get_zoom_level (viewport); + double tile_size = shumate_map_source_get_tile_size_at_zoom (map_source, zoom_level); + double map_height = shumate_map_source_get_row_count (map_source, zoom_level) * tile_size; + double map_width = shumate_map_source_get_column_count (map_source, zoom_level) * tile_size; + + double longitude_x = shumate_map_source_get_x (map_source, zoom_level, shumate_location_get_longitude (SHUMATE_LOCATION (viewport))); + double latitude_y = shumate_map_source_get_y (map_source, zoom_level, shumate_location_get_latitude (SHUMATE_LOCATION (viewport))); + + double delta_x = self->defer_longitude_x * map_width - longitude_x; + double delta_y = self->defer_latitude_y * map_height - latitude_y; + double velocity = sqrt (delta_x * delta_x + delta_y * delta_y); + double width = gtk_widget_get_width (GTK_WIDGET (self)); + double height = gtk_widget_get_height (GTK_WIDGET (self)); + double diagonal = sqrt (width * width + height * height); + double zoom_velocity = self->defer_zoom_level - zoom_level; + + gint64 frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (GTK_WIDGET (self))); + + /* Only compare between frames, otherwise we might mistakenly think the + velocity is 0. */ + if (frame_time == self->defer_frame_time) + return self->deferring; + + if (velocity > diagonal * 0.25 || fabs (zoom_velocity) > 0.25) + { + if (self->defer_callback_id == 0) + self->defer_callback_id = gtk_widget_add_tick_callback (GTK_WIDGET (self), defer_tick_callback, NULL, NULL); + + self->deferring = TRUE; + } + else + self->deferring = FALSE; + + self->defer_latitude_y = latitude_y / map_height; + self->defer_longitude_x = longitude_x / map_width; + self->defer_zoom_level = shumate_viewport_get_zoom_level (viewport); + self->defer_frame_time = frame_time; + + return self->deferring; +} + static void recompute_grid (ShumateMapLayer *self) { @@ -273,6 +343,7 @@ int source_columns = shumate_map_source_get_column_count (self->map_source, zoom_level); double rotation = shumate_viewport_get_rotation (viewport); + int n_tiles = 0; int size_x = MAX ( abs ((int) (cos (rotation) * width/2.0 - sin (rotation) * height/2.0)), @@ -291,7 +362,9 @@ int required_columns = tile_final_column - tile_initial_column; int required_rows = tile_final_row - tile_initial_row; - gboolean all_filled = TRUE; + gboolean defer = should_defer (self); + + gboolean all_filled = TRUE, all_done = TRUE; /* First, remove all the tiles that aren't in bounds, or that are on the * wrong zoom level and haven't finished loading */ @@ -323,14 +396,19 @@ g_autoptr(TileGridPosition) pos = tile_grid_position_new (x, y, zoom_level); ShumateTile *tile = g_hash_table_lookup (self->tile_children, pos); - if (!tile) + n_tiles ++; + + if (!tile && !defer) { tile = shumate_tile_new_full (positive_mod (x, source_columns), positive_mod (y, source_rows), tile_size, zoom_level); add_tile (self, tile, g_steal_pointer (&pos)); } - if (shumate_tile_get_state (tile) != SHUMATE_STATE_DONE) + if (tile == NULL || shumate_tile_get_paintable (tile) == NULL) all_filled = FALSE; + + if (tile == NULL || shumate_tile_get_state (tile) != SHUMATE_STATE_DONE) + all_done = FALSE; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.0.3/shumate/shumate-tile-downloader.c new/libshumate-1.0.4/shumate/shumate-tile-downloader.c --- old/libshumate-1.0.3/shumate/shumate-tile-downloader.c 2022-12-01 21:30:44.000000000 +0100 +++ new/libshumate-1.0.4/shumate/shumate-tile-downloader.c 2023-07-08 23:12:59.000000000 +0200 @@ -313,6 +313,9 @@ g_autofree char *modtime_string = NULL; SoupMessageHeaders *headers; + if (g_task_return_error_if_cancelled (task)) + return; + uri = get_tile_uri (data->self, data->x, data->y, data->z); data->msg = soup_message_new (SOUP_METHOD_GET, uri); ++++++ libshumate.obsinfo ++++++ --- /var/tmp/diff_new_pack.ukKNB9/_old 2023-07-14 15:35:38.101933968 +0200 +++ /var/tmp/diff_new_pack.ukKNB9/_new 2023-07-14 15:35:38.105933992 +0200 @@ -1,5 +1,5 @@ name: libshumate -version: 1.0.3 -mtime: 1669926644 -commit: 55d89e24de5086404b996a73e94cd56ee2e9541a +version: 1.0.4 +mtime: 1688850779 +commit: eb1afec539cb3aeae1f2d3f35fd377c51d5ead50