weston/libweston
Pekka Paalanen 9f53edd461 pixman-renderer: half-fix bilinear sampling on edges
When weston-desktop-shell uses a solid color for the wallpaper, it creates a
1x1 buffer and uses wp_viewport to scale that up to fullscreen. It's a very
nice memory saving optimization.

If you also have output scale != buffer scale, it means pixman-renderer chooses
bilinear filter. Arguably pixman-renderer should choose bilinear filter also
when wp_viewport implies scaling, but it does not. As w-d-s always sets buffer
scale from output scale, triggering the bilinear filter needs some effort.

What happens when you sample with bilinear filter from a 1x1 buffer, stretching
it to cover a big area? Depends on the repeat mode. The default repeat mode is
NONE, which means that samples outside of the buffer come out as (0,0,0,0).
Bilinear filter makes it so that every sampling point on the 1x1 buffer except
the very center is actually a mixture of the pixel value and (0,0,0,0). The
resulting color is no longer opaque, but the renderer and damage tracking
assume it is. This leads to the issue 373.

Fix half of the issue by using repeat mode PAD which corresponds to OpenGL
CLAMP_TO_EDGE. GL-renderer already uses CLAMP_TO_EDGE always.

This is only a half-fix, because composite_clipped() cannot actually be fixed.
It relies on repeat mode NONE to work. It would need a whole different approach
to rendering potentially non-axis-aligned regions exactly like GL-renderer.

Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/373

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-03-11 15:57:45 +02:00
..
backend-drm backend-drm: Parse KMS panel orientation property, apply to weston_head 2020-03-06 21:50:38 +00:00
backend-fbdev build: separate deps for int and ext libweston users 2019-10-24 13:29:33 +03:00
backend-headless Fix Wmaybe-uninitialized warnings 2020-01-28 12:30:56 +00:00
backend-rdp backend-rdp: enable undefined functions errors. 2020-03-05 14:43:58 +00:00
backend-wayland build: separate deps for int and ext libweston users 2019-10-24 13:29:33 +03:00
backend-x11 backend-x11: need libdrm headers in build 2019-10-24 13:29:33 +03:00
renderer-gl gl-renderer: Move EGL display creation to egl-glue.c 2020-02-18 18:11:26 +13:00
animation.c libweston: add missing include 2020-01-29 09:49:41 +00:00
backend.h libweston: Add transform to weston_head 2020-03-06 21:50:38 +00:00
bindings.c libweston: add missing include 2020-01-29 09:49:41 +00:00
clipboard.c libweston: add missing include 2020-01-29 09:49:41 +00:00
compositor.c libweston: Add transform to weston_head 2020-03-06 21:50:38 +00:00
content-protection.c content-protection: stop direct accessing core struct member 2020-01-29 09:55:24 +00:00
data-device.c libweston: add missing include 2020-01-29 09:49:41 +00:00
dbus.c dbus: Don't return value from void function 2019-06-11 11:31:04 +01:00
dbus.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
git-version.h.meson Add Meson build system 2018-12-09 14:50:54 +02:00
input.c input: use ro_anonymous_file to minimize duplication of keymap files 2019-11-04 15:10:05 +01:00
launcher-direct.c libweston: make session_active a bool 2019-07-18 06:35:41 +00:00
launcher-impl.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-logind.c libweston: Move 'struct weston_backend' to the internal backend header 2019-07-18 06:43:38 +00:00
launcher-util.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-util.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-weston-launch.c launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
libinput-device.c libweston: Migrate functions that operate on 'weston_output' into backend header 2019-07-18 06:43:38 +00:00
libinput-device.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libinput-seat.c libweston: Remove internal weston-log set-up function out of public header 2019-07-18 13:34:04 +03:00
libinput-seat.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libweston-internal.h libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
linux-dmabuf.c libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
linux-dmabuf.h libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
linux-sync-file-uapi.h libweston: Introduce an internal linux sync file API 2019-02-06 12:21:56 +00:00
linux-sync-file.c libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
linux-sync-file.h libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
log.c libweston: add missing include 2020-01-29 09:49:41 +00:00
meson.build libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
noop-renderer.c libweston: add missing include 2020-01-29 09:49:41 +00:00
pixel-formats.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
pixel-formats.h pixel-formats: add RGBA bits and type fields 2019-10-04 12:17:18 +03:00
pixman-renderer.c pixman-renderer: half-fix bilinear sampling on edges 2020-03-11 15:57:45 +02:00
pixman-renderer.h libweston: Introduce backend.h 2019-07-18 06:43:38 +00:00
plugin-registry.c Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
screenshooter.c screenshooter: get previous_damage from data argument instead of weston_output 2019-11-27 13:47:09 -03:00
spring-tool.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
timeline.c doc/sphinx: Add some documentation about timeline points 2019-10-17 21:42:25 +03:00
timeline.h doc/sphinx: Add some documentation about timeline points 2019-10-17 21:42:25 +03:00
touch-calibration.c libweston: add missing include 2020-01-29 09:49:41 +00:00
vertex-clipping.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vertex-clipping.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-launch.c launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-launch.h launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-log-file.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-flight-rec.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log.c weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
zoom.c libweston: Add functions to modify disable_planes counter for an output 2019-08-26 16:18:22 +05:30