Commit graph

1993 commits

Author SHA1 Message Date
Ray Strode
85fac71e08 splash-core: drop last vestigates of ply_seat_t
There's some left over goo.
2016-03-03 14:30:58 -05:00
Miroslav Urbanek
1ed8ec28df pixel-buffer: use double instead of float for scale factor
There are strange red and black dots in a 1280x800 splash screen with
Debian Jessie theme. The problem comes from image rescaling and is
caused by:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799953

on i386. The conversion from double to int in functions
ply_pixel_buffer_resize and ply_pixel_buffer_interpolate happens
through an intermediate float. This sometimes results in a truncated
value being larger than the original value.

This commit changes the code to use an intermediate double to
work around the bug.
2015-11-18 10:48:46 -05:00
Ray Strode
f80684387a boot-splash: don't crash in free if module not loaded
ply_boot_splash_free currently calls some code that depends
on a module being loaded.  We call ply_boot_splash_free to
clean up the boot splash object if a module can't be loaded,
leading to crash.

This commit addresses that issue by only calling the module
specific destruction code in ply_boot_splash_free in the case
where a module is loaded.

https://bugs.freedesktop.org/show_bug.cgi?id=91590
2015-08-10 10:15:19 -04:00
Ray Strode
77d303d07b device-manager: force details if serial consoles are used
it's better to skip trying to load the default splash rather than
relying on it failing and falling back.
2015-07-30 16:03:12 -04:00
Ray Strode
ef7adc3677 device-manager: decouple local console from output device
The code currently does a faulty heuristic to figure out which
drm device is associated with the tty.  We shouldn't actually
even need an accurate association, so this commit just makes
sure the terminal gets used for the first device.
2015-07-30 16:03:11 -04:00
Ray Strode
c0ee9474a3 device-manager: drop seat abstraction
The seat abstraction isn't really right, since it forces creating a
link between terminal and video output device, which isn't really
necessary (and other reasons).

This commit drops the abstraction, and moves all the code that was
in ply-seat.c directly to ply-device-manager.c.
2015-07-30 16:03:11 -04:00
Ray Strode
0bb3bd69c1 pixel-display: add getters for renderer data
These functions are useful for matching a pixel display
to its renderer.
2015-07-30 16:03:11 -04:00
Ray Strode
ea91f9baee keyboard: track activeness
Right now, ply-seat has to handle tracking
keyboard activeness on its own.  This commit
moves activeness tracking to ply-keyboard
directly.
2015-07-30 16:03:11 -04:00
Ray Strode
c6a582d05d keyboard: track activeness
Right now, ply-seat has to handle tracking
keyboard activeness on its own.  This commit
moves activeness tracking to ply-keyboard
directly.
2015-07-30 16:03:11 -04:00
Ray Strode
b0052df515 renderer: track activeness
Right now, ply-seat has to handle tracking
renderer activeness on its own.  This commit
moves activeness tracking to ply-renderer
directly.
2015-07-30 16:03:11 -04:00
Ray Strode
02c70f069b animation,throbber: allow calling stop after animation is stopped
Right now if a user calls ply_throbber_stop or ply_animation_stop
after the animation is stopped things malfunction.  In the case
of the throbber we end up never calling the stop completion handler
passed in, and in the case of the animation, we end up setting
some state that shouldn't be set.

This commit checks if the animation and throbber objects are stopped,
and if so does the necessary steps to process the late stop request.

Spotted by Dave Airlie
2015-07-30 16:03:11 -04:00
Ray Strode
d37da49aca drm: fix crasher in unload_backend
we were freeing the state struct and then closing items in it.
2015-07-30 16:03:10 -04:00
Sjoerd Simons
ed5aa69d4a script: Don't draw backgrounds if they're obscured
When drawing sprites it's a waste to draw the background if the target
area will be obscured by the sprit to draw. Optimize for the common case
where only one sprite is being drawn by peeking at the first item in the
sprite list to check if it is opaque and fills the area.

https://bugs.freedesktop.org/show_bug.cgi?id=87105
2015-03-25 21:24:08 -04:00
Sjoerd Simons
c052d9fccd ply-image: Don't do alpha pre-multiplication for opaque pixels
When transforming the output of libpng to ARG32 with pre-multiplied
alpha, only do the multiplications if the pixel isn't opaque. Otherwise
plymouth is just applying a very complicated identity function.

https://bugs.freedesktop.org/show_bug.cgi?id=87105
2015-03-25 21:09:50 -04:00
Sjoerd Simons
61a26f4216 pixel-buffer: Optimize filling with opaque buffers
If the source buffer is known to be fully opaque and the fill is done at
full opacity, simply memcpy the data row-by-row instead of iterating over
every pixel and blending it with the target buffer.

This could be optimized more, in the future, in some cases, by memcpy of
the entire block instead of row-by-row.

https://bugs.freedesktop.org/show_bug.cgi?id=87105
2015-03-25 21:05:33 -04:00
Sjoerd Simons
00ee03695c pixel-buffer: add ability track opaqueness
Pixel buffers contain ARGB32 data. Add functionality to mark a buffer as
containing only fully opaque pixels. This functionality can be used by
rendering functions to be able to optimize drawing of such buffers.

https://bugs.freedesktop.org/show_bug.cgi?id=87105
2015-03-25 20:59:25 -04:00
Ray Strode
4ecd0c2436 drm: rename "buffer" to "output_buffer"
This just makes it more clear that the buffers are used for scan
out.
2015-03-25 20:46:12 -04:00
Ray Strode
54583fdf1b drm: free drm mode resources object
This fixes a small memory leak.
2015-03-25 20:39:30 -04:00
Ray Strode
179fd4efa8 drm: don't try to draw to fbcon on unmap
We don't support mapping the console, so trying to write
to it is a futile endeavour
2015-03-25 20:31:52 -04:00
Ray Strode
9b396fafeb drm: merge ply-renderer-generic-driver.c to plugin.c
Now that we don't have several drivers, having the
backend/driver separation makes little sense.

This commit merges everything in plugin.c
2015-03-25 20:31:51 -04:00
Ray Strode
655b1b2646 drm: assume driver doesn't support mapping console
We only support the generic driver now, and it doesn't
support mapping the console.

This commit removes the supports_mapping_console boolean,
and any code that checks for console mapping.
2015-03-25 19:18:45 -04:00
Yixun Lan
4519fe0db5 systemd: Allow specifying unit dir to configure
systemd isn't necessarily in the buildroot at the time that plymouth
gets built, so autodetection of the unitdir from pkgconfig isn't
necessarily feasible.

This commit adds a new option to configure, --with-systemdunitdir,
that lets distros specify the unit directory manually.

https://bugs.gentoo.org/show_bug.cgi?id=543712
2015-03-20 13:04:12 -04:00
Ray Strode
9d62fefeed configure: bump to 0.9.3 2015-03-17 21:50:43 -04:00
Ray Strode
2c437c364b configure: bump to 0.9.2 2015-03-17 14:52:52 -04:00
Ray Strode
317b211cc6 main: don't handle udev events when deactivated
We don't want to spontaneously reactivate.

https://bugs.freedesktop.org/show_bug.cgi?id=89474
2015-03-06 16:01:59 -05:00
Jasper St. Pierre
51fa359fe4 two-step: Add separate startup / shutdown animations
In the case of Endless, we have a very fluid active bootup animation
that looks quite excellent for turning the computer on, but when turning
it off or restarting, it's sort of awkward to have the same animation
play. For our use case, we want to simply show our watermark.
2015-03-02 19:20:44 -05:00
Jasper St. Pierre
d9916322c1 ply-animation: Fix drawing if it happens before the timeout
animation->frame_area isn't filled in until the timeout, but clients
might draw it beforehand. Since animation->frame_area isn't used
anywhere else and we already have the x/y values in animation->x/y,
just use those and remove animation->frame_area.
2015-03-02 19:20:44 -05:00
Bastien Nocera
361cec592a text: Change default text splash's colors
As per GNOME mockups:
https://wiki.gnome.org/Design/OS/Boot

Note that this also removes the blue terminal color setting, as it is
not used in the text plugin.

https://bugs.freedesktop.org/show_bug.cgi?id=88888
2015-02-03 10:19:33 -05:00
Bastien Nocera
26ab3df47a spinner: Add noise texture
As per GNOME mockups:
https://wiki.gnome.org/Design/OS/Boot

https://bugs.freedesktop.org/show_bug.cgi?id=88888
2015-02-03 10:19:32 -05:00
Ray Strode
d8278c93ad device-manager: try fb device if drm device failed
If the drm device failed to work, then fall back to the fb device.

Right now, we ignore fb devices that have associated drm devices.

This may fix vmwgfx.
2015-01-07 16:26:03 -05:00
Ray Strode
2ef12342b9 animation: don't report success when no frames were added
Currently, the animation object will report success when assets are *found* in
the directory. When loading those assets, code will apply more checks to
determine if the assets are meant for the animation.
In case none of them are, we'll end up not adding any frames, so we
should not report a successful load.

This is like commit 741b545868 but for
animation objects instead of throbber objects.
2015-01-05 12:52:08 -05:00
Cosimo Cecchi
741b545868 throbber: don't report success when no frames were added
Currently, the throbber will report success when assets are *found* in
the directory. When loading those assets, code will apply more checks to
determine if the assets are meant for the throbber.
In case none of them are, we'll end up not adding any frames, so we
should not report a successful load.
2015-01-05 12:49:50 -05:00
Cosimo Cecchi
f2d378fe1b throbber: don't report successful load when no assets
Currently, the throbber will report a successful load when zero assets
are loaded. Change it so that zero assets do not result in a
successfully loaded throbber.

This is similar to commit 3d7f4fe441 but
for throbber objects instead of animation objects.
2015-01-05 12:48:34 -05:00
Jasper St. Pierre
b0863e73e6 x11: Port to GTK+ 3.0
Port the remaining GTK+ code, the X11 renderer, to GTK+ 3.0.
2015-01-05 12:43:46 -05:00
Jasper St. Pierre
884818222c Remove the old log viewer tool 2015-01-05 12:43:37 -05:00
Jasper St. Pierre
3cce620e75 main: Don't redirect output to /dev/null if we're tracing
Otherwise, our input will mysteriously disappear.
2015-01-05 12:43:09 -05:00
Sjoerd Simons
b97c30a019 utils: Don't create unix sockets non blocking
All the ply_read* functions assume the socket is doing blocking reads,
so opening unix sockets in non-blocking mode doesn't seem the best idea.

Specifically, this was causing ask-password to fail to read the response
at times as it got a -EAGAIN back from read rather then data.
2014-11-17 09:38:14 -05:00
Sjoerd Simons
27fdc7497f script: Add SetRefreshRate function
The script plugin hardcodes an FPS value of 50, which for some themes
and various devices is a bit much.  Add a new function
(Plymouth.SetRefreshRate) which sets the rate at which the
RefreshFunction gets called so each script theme can determine their most
appropriate rate.

https://bugs.freedesktop.org/show_bug.cgi?id=86247
2014-11-13 08:58:22 -05:00
Ray Strode
77b0b0a343 main: fix up spacing in previous commit to match coding style
The previous commit introduced a get_splash_mode_from_mode function
which used the wrong indentation.

This commit fixes up the indentation.
2014-10-22 11:37:34 -04:00
Ray Strode
a9e9165222 main: fix up mode confusion
plymouthd runs in a particular mode "boot" "shutdown" "updates" at any
given time.  Likewise, the plymouth splash object also takes a mode.
These modes map 1-to-1 with each other, and there is more than one place
in the code where we need to get the splash mode from the overall mode.

This commit adds a helper function to perform this translation, and
cleans up the places where the wrong mode type is used or the
translation performed is incomplete.
2014-10-22 11:33:16 -04:00
johnv-valve
b5739c6c99 script support system update events
Add new script function, SetSystemUpdateFunction to allow scripts
to register a callback for system update progress notifications.
2014-10-17 15:19:13 -04:00
Ray Strode
6525ae6017 client: fix incorrectly sized buffer for /proc/cmdline
We assume /proc/cmdline will be no more than 512 bytes (including NUL).
It can actually be 4096 bytes (excluding NUL).

This commit makes sure we allocate enough space for it and its NUL.

This is just like the previous fix for the daemon, but for the client,
now.
2014-10-17 11:19:39 -04:00
Ray Strode
5caf43a2c3 main: fix incorrectly sized buffer for /proc/cmdline
We assume /proc/cmdline will be no more than 512 bytes (including NUL).
It can actually be 4096 bytes (excluding NUL).

This commit makes sure we allocate enough space for it and its NUL.
2014-10-10 16:12:55 -04:00
Ray Strode
530612fb79 main: show splash even when user has init=/bin/sh
At the moment, we don't bother showing the splash
screen if init=/bin/sh since we assume the user
wants to be see the shell prompt.

The problem is, since we don't show a splash screen
we don't handle LUKS in the initrd.

This commit makes us show the splash for the duration
of the initrd but quit on switch root.
2014-10-10 14:29:55 -04:00
Laurent Bigonville
2c65fc7c22 Revert "systemd: add WantedBy snippets"
This reverts commit 7adb50c267.

The .service files are already statically enabled, adding the Install
section and the WantedBy option is useless

Conflicts:
	systemd-units/plymouth-quit-wait.service.in

https://bugs.freedesktop.org/show_bug.cgi?id=80048
2014-07-28 14:56:29 -04:00
Ray Strode
40c2dd36c5 text-step-bar: use correct utf-8 multibyte sequence for ■
For some reason in commit 113526408c
I commited the sequence \x25\x96\xa0 in place of the block character
that was there before.  I don't know where I got \x25 from, but it's
not right (and couldn't even be right since the high order bit isn't
set which is a requirement for the first byte in multi-byte utf-8
sequences).

This commit uses \xe2 instead which I got from doing:

$ echo ■  | xxd
0000000: e296 a00a                                ....
2014-07-28 09:58:49 -04:00
Ray Strode
84eb4381db seat: be a little more forgiving in the case there's no open terminal
We can end up in a situation where a seat object doesn't have a terminal
associated with it.  In that case we shouldn't crash, but continue on
with no input available for that seat.

https://bugs.freedesktop.org/show_bug.cgi?id=80553
2014-07-14 08:04:54 -04:00
Dimitri John Ledkov
a58ae9ba27 configure: bump point release and ABI versions of libraries.
Due to removed interfaces since 0.8.8:
ply_boot_splash_set_keyboard
ply_boot_splash_unset_keyboard
ply_boot_splash_add_pixel_display
ply_boot_splash_remove_pixel_display
ply_boot_splash_add_text_display
ply_boot_splash_remove_text_display

And a bunch of new ones added.
2014-07-11 14:29:45 -04:00
Frederic Crozat
b7fdd62fff libply-splash-core: also monitor for file removal in udev directory
Ensure plymouth detects coldplug completion with recent udev (>= 213).
2014-06-27 14:48:00 +02:00
Frederic Crozat
05cbf14855 .gitignore: ignore generated manpages 2014-06-26 10:42:45 +02:00