Ray Strode [Wed, 13 Jan 2010 19:27:46 +0000 (14:27 -0500)]
[splash] Rename libplybootsplash to libply-splash-core
Splashes aren't just shown for "boot" so including "boot" in
the name isn't right. Also, right now we link against libpng
even if we don't have any splash that uses it. This is the first
step toward making libpng only get linked to graphical splashes.
We'll need to move the graphical bits to their own library to
complete the process.
Ray Strode [Wed, 16 Dec 2009 18:20:34 +0000 (13:20 -0500)]
[branch-merge] Add man page
This merges the "man-page" branch to master.
Thanks to Adrian Glaubitz we now have a man page for plymouth.
This is a good start to documenting the basics of plymouth.
We'll eventually need more comprehensive reference documentation
before 1.0 is released, and now we have some of the ground work
(a docs/ directory) for that.
Ray Strode [Wed, 16 Dec 2009 13:48:45 +0000 (08:48 -0500)]
[docs] Remove instructions about boot loader
They weren't completely accurate, you don't need to reinstall
grub after editing its config, since it has built-in filesystem
drivers. Also, those details very from system to system, so we
should probably just leave it out.
Ray Strode [Wed, 16 Dec 2009 13:41:33 +0000 (08:41 -0500)]
[docs] Remove distribution references from man page
We don't want to provide a history of what distributions
used before plymouth, because that history could get long,
isn't super relevant, and will add noise for a users looking
for help (they probably only care about their distributions,
not others).
Adrian Glaubitz [Sat, 5 Dec 2009 17:05:10 +0000 (12:05 -0500)]
[set-default-theme] Add --help option
When running new, unfamiliar commands I usually invoke them with
--help to see what options they have. For plymouth-set-default-theme,
there is no --help option which I find a bit confusing, especially
since the usage is not straight-forward.
There is now an additional function "show_help" which displays an
help output when invoking plymouth-set-default-theme with --help.
Charlie Brej [Sun, 29 Nov 2009 02:35:10 +0000 (02:35 +0000)]
[label] Add color control
Previously we drew two overlapping labels, one in black and one in white, to
make sure it was vsible on all backgrounds. Now we can pick an appropreate
color for each theme. The default is white. If changing the label color once it
has been shown, it will redraw that part of the screen.
Charlie Brej [Sun, 29 Nov 2009 01:19:37 +0000 (01:19 +0000)]
[script] Allow setting the position of the windows
Although the windows are set up to in a reasonable default configuration, the
themes may align the windows differently to not crop some important elements.
The Window.SetX and SetY allow positioning the window anywhere on the canvas.
Use this sparingly as it induces a full refresh of all screens.
If there is a desire to have totally different scenes, the second window can be
positioned somewhere far away so there is overlap and a complete different set
of sprites is used. Another sensible configuration is to have the screens side
by side and allow sprites to span the gap. Remember to create password dialogs
for each screen as not all may be visible.
Charlie Brej [Sun, 29 Nov 2009 00:20:52 +0000 (00:20 +0000)]
[script] Handle multiple displays with one script instance
When multiple displays were introduced, each display had its own script plugin
instance. This made things easy as the scripts would not have to be rewritten
for multiple screens. Unfortunately this also meant that each image was loaded
multiple times, and the scripts consumed much more processing power.
Additionally the scripts were not aware of each other.
This patch allows a single script instance to control multiple displays while
maintaining reasonable backward compatibility. All sprites are placed on a
virtual canvas. Displays (or windows) then expose parts of this canvas to the
user.
As a default, window 0 is placed at 0,0. Further windows are placed on top of
the window 0 area matching the centre point so the password dialog (which is
placed in the centre) is visible on all windows. If you target window 0 only
and you place dialogs in the middle of the screen, then everything should work
fine.
Window.GetWidth/GetHeight now takes a window number (if none supplied it will
assume 0). If it replies a NULL, then you accessed beyond the end of the
window set.
Charlie Brej [Sat, 28 Nov 2009 20:08:09 +0000 (20:08 +0000)]
[list] Add a stable sort
Stable sort sorts but does not change the order of elements which are equal.
This is important in the sprite based plugins where if the level of the sprites
is equal because it may be unimportant which is on top, changing the order
between frames looks bad.
Charlie Brej [Sat, 28 Nov 2009 19:10:53 +0000 (19:10 +0000)]
[region] Allow rectangles to be sorted before being fed back
The renderers commit the rectangles derived from the region in a random order.
This gives some tearing as the screen is displayed with a random regions in
their new state. The change sorts the list of rectangles according to their Y
value to commit them from top to bottom. This gives fewer tear lines.
Ray Strode [Sat, 28 Nov 2009 04:44:21 +0000 (23:44 -0500)]
[branch-merge] Improve plymouth -> X hand off
This merges the "no-fbcon" branch to master.
Previously, the way to get a transition between
plymouth and X was for plymouth to quit,
leaving the tty in KD_GRAPHICS mode, and hope
X starts and picks up the peices. In this
limbo state where plymouth isn't running but X
isn't started yet the user is unable to
switch VTs or really do anything at all.
If X doesn't start then the user is hosed; they
have to reboot.
Now, instead of quitting plymouth before starting
X we "deactivate" it. This gets plymouth into a
state where X can take over the display, but
plymouth stays running. Once X has fully started
up or failed to start the display manager can
tell plymouth to quit (with --retain-splash if
X started successfully and without if X started
unsucessfully)
Ray Strode [Sat, 28 Nov 2009 04:29:30 +0000 (23:29 -0500)]
[daemon] deactivate daemon for X transition
In order for plymouth to be able to stay around until
after X is started, we need to put the daemon into a
"deactivated" state where it makes the splash becomes idle
and relinquishes control of the scan out hardware and keyboard
for X to seize.
This commit listens for deactivation requests in the daemon and
performs the deactivation.
A future commit will implement the client bits needed.
Charlie Brej [Tue, 24 Nov 2009 22:46:27 +0000 (22:46 +0000)]
[script] Add string library and the first function "CharAt"
Currently the strings must be manually told to adopt from the library functions
by using String("string").function(). This is temporary and later it should be
possible to apply functions directly to strings.
CharAt gives the a single character string at the index specified. The first
character is at index zero. Characters beyon the end are empty strings, and
errors return NULL. This can be used thusly:
str = "something";
letter = String(str).CharAt(7); # letter = "n"
letter = String(str).CharAt(12); # letter = ""
letter = String(str).CharAt("foo"); # letter = NULL
Charlie Brej [Mon, 23 Nov 2009 00:41:02 +0000 (00:41 +0000)]
[script] Use a region to collate all updated areas
Previously, refresh, each sprite would refresh its old area, then its new area.
This, combined with situations where there are many sprites caused the area to
be redrawn many times, each time redrawing each overlapping sprite data.
Now we add all areas which need to be refreshed to a region and this makes a
smaller set of rectangles to refresh, and these are not overlapping.
Also uses the freeze display updates, which should work better now.
Charlie Brej [Mon, 23 Nov 2009 00:23:22 +0000 (00:23 +0000)]
[rectangle] Add exact overlap detection
If the width and X position of the two rectangles is the same, we can merge
them together. The new set of exact overlaps detects this and determines the
direction the rectangle should be extended.
The region code now uses this. WARNING, when expanding rectangles, these have
to be merged with the other rectangles down the list as there may be overlap.
Charlie Brej [Sun, 22 Nov 2009 23:53:48 +0000 (23:53 +0000)]
[rectangle] Rewrite rectangle_find_overlap function
The previous version had a flaw where it would find the rectangles overlapping
if they spanned a range in one axis. Despite them having no overlap in the
other axis.
Because this version has strange (although correct) behaviour when dealing with
empty rectangles, region only calls the overlap function when both rectangles
are not-empty.
The issue is if an empty rectangle sits on the edge of a full rectangle, the
function reports (possibly correctly) that the edge is overlapped by the empty
rectangle. The region code then nudges the rectangle down one space and
subtracts one from the empty rectangle height. This creates a rectangle with
negative height (bad thing).
If the other version can be fixed I will put it back, but this one is also
useful for the combining two rectangles of equal width.
Charlie Brej [Sun, 22 Nov 2009 22:53:12 +0000 (22:53 +0000)]
[region] Remove element only after processing
Now that we cannot rely on the next_node element. We must finish processing the
entry before removing it. Easiest way is to recurse and remove after return.
Charlie Brej [Sun, 22 Nov 2009 22:42:13 +0000 (22:42 +0000)]
[region] Couple more minor bugs in rectangle merge
Also one redundant line. I think this code was never used in anger. There is a
major bug in the rectangle collision code which makes this detection ad-hoc.
Charlie Brej [Sun, 22 Nov 2009 22:21:49 +0000 (22:21 +0000)]
[region] Do not prefetch next rectangle node while processing list
If we fetch the next node while working on the current node, recursing down the
list may remove the next node. Just to be double sure, we recurse direct to
next node so the current is not damaged.
Charlie Brej [Sat, 21 Nov 2009 22:35:55 +0000 (22:35 +0000)]
[x11] Force refresh area to start at 0,0
The x and y values, in area element, were used to determine the position of the
window on the screen. With the x and y not at 0, the full redraw not working
correctly on the second head.
Charlie Brej [Sat, 21 Nov 2009 17:45:41 +0000 (17:45 +0000)]
[script] Add text to image capability
Enables scripts to display test by converting it into an image. This can then
be shown using a sprite. Function takes a string and the value of the three
colors (red green blue).
new_image = Image.Text("text we want", 1.0, 0.0, 0.0); // gives red text image
Charlie Brej [Sat, 21 Nov 2009 16:30:34 +0000 (16:30 +0000)]
[script] Migrate from image to pixel buffer
The script image is now a pixel buffer. This allows some clever possibilities:
We can now implement text to image.
We can compose images by drawing on them, and record the areas which changed to
avoid refreshing the whole thing.
Charlie Brej [Sat, 21 Nov 2009 12:35:09 +0000 (12:35 +0000)]
[fade-throbber] Move logo opacity value to individual views
When the logo opacity was plugin wide, one view would change its logo, and the
others would not bother. This prevented the logo form showing up on the second
screen.
Charlie Brej [Thu, 19 Nov 2009 23:21:22 +0000 (23:21 +0000)]
[image] Remove fd from the image structure
The fd element was only used within the load function so did not need to be in
the structure. Also removes the open and close file functions. Their contents
is inlined.
This is the last cleanup before merging with pixel-buffer.
Charlie Brej [Mon, 16 Nov 2009 23:24:20 +0000 (23:24 +0000)]
[animation] Make sure we do not access frames beyond the end of the animation
Small bug which would try to access the animation frame beyond the end of the
array. Only occurs when doing a redraw after the animation has completed
(e.g. password dialog).
Charlie Brej [Sat, 14 Nov 2009 21:38:11 +0000 (21:38 +0000)]
[image] Optimise interpolate and rotate routines.
These are small optimisation to: terminate interpolation early when operating
on fully transparent regions and do rotations by pre-computing the step size
rather than calling cos/sin/atan. These use around 30% fewer instructions on
general images.
Charlie Brej [Wed, 28 Oct 2009 20:11:47 +0000 (20:11 +0000)]
[script] Add an "on quit" callback to scripted themes
The callback is called before the final sprite refresh and quit. This allows
the theme to tidy up the screen before handing over to the X fade and the
destop manager.
Ray Strode [Wed, 14 Oct 2009 15:29:55 +0000 (11:29 -0400)]
[text] Don't redraw views after password request
The text plugin doesn't have proper draw handlers at
the moment. Drawing happens outside of the draw handlers,
and the draw handlers only clear screen. Don't force
draw_area calls because that clears any drawing.
Charlie Brej [Tue, 13 Oct 2009 21:41:42 +0000 (22:41 +0100)]
[script] Sprite and Image objects inherit from an empty scalar
Sprite and Image objects now inherit from an empty scalar which can be used to
keep any random data assoceated with that object. Previously there was a
dangerous tendency to pass any scalar operations to the top inherrited scalar
which was the class prototype.
Charlie Brej [Tue, 13 Oct 2009 21:23:36 +0000 (22:23 +0100)]
[script] Change order of spriterefresh operations to remove an incorrect redraw
If a full refresh takes place, the system redraws the whole window but forgets
to remove sprites and update their old positions. The full window refresh is
now done last. Also old_width, and old_height are initialised at sprite
construction.