Go to file
Ray Strode f581ade9a3 texture-cache: preserve aspect ratio of loaded pixbufs
st_texture_cache_load_file_async takes optional width and height hints
to specify how much space on-screen the loaded image will take up. One
or both of the width and height can be negative.

gdk-pixbuf uses this information to scale down the image to an
appropriate size, when necessary, to save memory and prevent
aliasing.

gdk-pixbuf never uses this information to scale up the image, though;
that would just waste memory. Instead, the width and height hints are
used to set the geometry of the clutter content, so the texture may
get upscaled on-screen.

If both the passed in width and height are negative, it means to assume
the image will fit at native size, and gdk-pixbuf shouldn't downscale
the image.

If just one dimension is negative, it means the image should be
downscaled by gdk-pixbuf proportionally to fit the given (positive)
dimension.

If neither dimension is negative, it means the image should be
downscaled by gdk-pixbuf proportionally to fit whichever dimension keeps
the whole image within the bounds of its clutter content.

In any case, if the passed in width and height are bigger than the
dimensions of the loaded image, then those passed in values won't be used
by gdk-pixbuf, since it has no downscaling to do.

The problem is, the code that converts a pixbuf to a clutter content
fails to handle the case where the passed in dimensions aren't used by
gdk-pixbuf.  It assumes at least one of the pixbuf dimensions matches the
dimensions passed to st_texture_cache_load_file_async.  That won't be the
case if the pixbuf code had no downscaling to do.

This commit fixes that problem by deriving the unknown clutter content
dimension from the known clutter content dimension and the aspect ratio
of the image.
2019-04-30 14:58:26 -04:00
.gitlab-ci ci: Improve script output 2019-04-26 21:32:51 +02:00
.settings Clean out some eclipse artefacts 2019-02-13 04:39:26 +01:00
data theme: Update window preview style 2019-04-17 21:25:34 +00:00
docs/reference shell: Remove ShellGenericContainer 2018-10-08 22:44:14 -03:00
js worldClocks: Ignore locations with unknown timezone 2019-04-30 16:15:27 +00:00
man man: Update project website 2018-01-07 21:39:18 +01:00
meson build: Run postinstall script where necessary 2018-04-09 19:19:33 +00:00
po Update Friulian translation 2019-04-26 14:11:05 +00:00
src texture-cache: preserve aspect ratio of loaded pixbufs 2019-04-30 14:58:26 -04:00
subprojects gvc: Update submodule to up-to-date version 2019-02-28 21:59:08 +01:00
test Add convert_xml test 2019-03-04 20:55:15 +00:00
tests cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
tools build: Remove Canberra dependency 2019-01-09 23:09:18 +00:00
.gitignore Ignore '.vscode' folder for users of that editor 2019-04-02 17:37:31 +00:00
.gitlab-ci.yml ci: Ensure we clone a deep enough history for commit review 2019-04-24 13:28:07 +02:00
.gitmodules submodules: Replace non-functional git.gnome.org URL by GNOME Gitlab URL 2018-09-25 08:41:30 +02:00
cldr2json.py Fix override for fr-CA 2019-03-04 20:55:15 +00:00
config.h.meson Add check_cloexec_fds debug command 2018-07-30 23:11:41 +00:00
COPYING Changed obsolete FSF postal address. 2014-01-08 04:35:14 +07:00
gnome-shell.doap Replace Bugzilla by Gitlab URL in DOAP file 2018-12-15 23:26:54 +01:00
HACKING.md cleanup: Use destructuring for imports from GI 2019-02-09 07:39:20 +01:00
meson_options.txt Remove the browser plugin 2018-12-31 13:25:05 -06:00
meson.build meson.build: Add more compilation warnings 2019-04-17 21:39:03 +00:00
NEWS Bump version to 3.32.1 2019-04-17 21:08:32 +02:00
README.md README.md: Add contribution section 2019-02-13 20:37:39 +01:00
README.mdwn Add basic documentation 2019-03-04 20:55:15 +00:00

GNOME Shell

GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.

For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.

Bugs should be reported to the GNOME bug tracking system.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.

Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.

License

GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.