weston/compositor
Pekka Paalanen 3429a72597 compositor: fix uniform handling for fade_output()
fade_output() is strange in that it manufactures a wlsc_surface object
by hand, and then calls wlsc_surface_draw() on it.

Valgrind complained, that wlsc_surface_draw() accesses uninitialised
data: wlsc_surface::alpha. fade_output() forgets to set it.

Initialise surface.alpha in fade_output(). Specifically, set it to
compositor->current_alpha to deliberatly avoid the gluniform1f() call in
wlsc_surface_draw().

fade_output() binds a different GL shader program than
wlsc_surface_draw() expects. This program does not have a uniform called
"alpha", and the uniform location given in glUniform1f() is not for
this program anyway. A hint of that is the runtime error:
Mesa: User error: GL_INVALID_OPERATION in glUniform(type mismatch)

Fixing this seems to get rid of half a thousand of Valgrind errors, and
of course the Mesa user error.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-20 10:59:39 -05:00
..
.gitignore Update .gitignores 2011-12-08 11:36:36 +02:00
compositor-drm.c evdev: new header file for the driver 2011-12-19 01:14:03 +02:00
compositor-openwfd.c evdev: new header file for the driver 2011-12-19 01:14:03 +02:00
compositor-wayland.c wl_shell_surface adaptation 2011-12-04 14:54:26 -05:00
compositor-x11.c x11: Ignore FocusOut with mode = NotifyUngrab 2011-12-19 14:36:52 -05:00
compositor.c compositor: fix uniform handling for fade_output() 2011-12-20 10:59:39 -05:00
compositor.h compositor: Remove shell->activate callback 2011-12-19 15:21:40 -05:00
data-device.c Implement the new dnd/selection protocol 2011-11-23 16:20:28 -05:00
evdev.c evdev: new header file for the driver 2011-12-19 01:14:03 +02:00
evdev.h evdev: new header file for the driver 2011-12-19 01:14:03 +02:00
image-loader.c compositor: Split backends into modules 2011-05-02 22:09:20 -04:00
Makefile.am evdev: new header file for the driver 2011-12-19 01:14:03 +02:00
screenshooter.c Change remaining GPLv2 headers to MIT 2011-09-19 17:29:24 -04:00
shell.c compositor: Remove shell->activate callback 2011-12-19 15:21:40 -05:00
switcher.c Make use of wl_resource.destroy_listener_list for surfaces. 2011-05-06 16:03:33 -04:00
tablet-shell.c compositor: Remove shell->activate callback 2011-12-19 15:21:40 -05:00
tty.c compositor-tty: Fix ioctl error handling 2011-12-05 09:48:42 -05:00
util.c compositor: Move binding code to util.c 2011-12-19 15:21:30 -05:00
xserver-launcher.c x11: Fix last-minute edit bug 2011-10-12 00:01:18 -04:00