st-texture-cache: Separate 'scale' to 'paint_scale' and 'resource_scale'

Instead of just passing a scale when getting a cached icon, pass both a
'paint_scale', the scale of which the icon will be painted on the
stage, and a 'resource_scale', the scale of the resource used for
painting.

In effect, the texture size will use the scale 'paint_scale * resource_scale'
in a ceiled value while the size of the actor will use 'paint_scale' when
determining the size.
this would load a bigger texture, but the downscaling would keep the visual
quality.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/5
https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
Marco Trevisan (Treviño) 2017-05-11 06:25:00 +02:00 committed by Jonas Ådahl
parent 37f53a42da
commit 420697693b
5 changed files with 117 additions and 56 deletions

View file

@ -782,7 +782,8 @@ var LoginDialog = GObject.registerClass({
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
-1, _LOGO_ICON_HEIGHT,
scaleFactor));
scaleFactor,
1));
}
}