Commit graph

1227 commits

Author SHA1 Message Date
Charlie Brej
2dbac8e942 [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.
2009-11-21 16:30:34 +00:00
Charlie Brej
fdfdd822fa [pixel-buffer] Move resize and rotate function from image to pixel buffer
There are comparability versions in image, but these are now deprecated.
2009-11-21 15:51:17 +00:00
Charlie Brej
1056a62695 [image] Allow converting an image to a pixel buffer
A pixel buffer is a much more useful object to manipulate. The image should
only be used when loading from files and never manipulating.
2009-11-21 14:10:23 +00:00
Charlie Brej
481b39155d [fade-throbber] Initialise views before animating
Only run the call to animation after all views are initialised. No visible
changes but this is more correct.
2009-11-21 12:52:48 +00:00
Charlie Brej
74ac719031 [fade-throbber] Move some operations from view to plugin start animation
There were timeouts called once for each view and the first view would cause
is_animating to be set which would stop other views from initialising.
2009-11-21 12:45:45 +00:00
Charlie Brej
ef82eb9a61 [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.
2009-11-21 12:35:09 +00:00
Charlie Brej
58a28b3eeb [image] Use a pixel buffer to hold the image size and data
The image structure now contains a pixel buffer which holds the data. Some
functions are still within image for compatibility during the migration.
2009-11-19 23:55:22 +00:00
Charlie Brej
c0f5615e24 [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.
2009-11-19 23:21:22 +00:00
Charlie Brej
4ae19c65af [image] Remove image layout structure
Simplifies the image structure to make it more similar to the pixel-buffer
2009-11-19 22:47:54 +00:00
Charlie Brej
a903cd4808 [image] Remove size from the image structure
Size was never used. Also removes the ply_image_get_size function.
Clean-up in preparation for merging with pixel-buffer.
2009-11-18 23:13:39 +00:00
Ray Strode
310b58922c Revert "[script] free views before nullifying event loop"
This reverts commit a93b6525b3.

It has unpleasant side-effects, and the real problem was fixed
in the last view commits.

Analysis from Charlie.
2009-11-18 16:51:20 -05:00
Ray Strode
63c94dfc6d [event-loop] Restart front of pending timeout list after dispatch
This is in case a timeout handler invalidates the list while being
dispatched.
2009-11-18 16:32:09 -05:00
Ray Strode
030a3a27a7 [event-loop] Remove pending timeout before dispatching
This way if the timeout handler removes itself, we don't
double-free and crash.  This is a better fix for

commit 79baa323e6
2009-11-18 16:26:03 -05:00
Ray Strode
b243f0c0bd Revert "[event-loop] Don't crash by running removed timeouts"
This reverts commit 79baa323e6.

It wasn't really the right way to fix the original problem.

Now we end up in a case where timeouts can still run after
stop_watching_for_timeout is called on them.  This can cause
crashes.

We need to instead fix the problem in a different way.
2009-11-18 16:24:23 -05:00
Ray Strode
a93b6525b3 [script] free views before nullifying event loop
If we don't do this then a timeout will get scheduled
by view_stop_animation.
2009-11-17 19:06:09 -05:00
Ray Strode
5a306e0b13 [event-loop] add some time out debugging statements
Now we report if code tries to remove a non-existing timeout,
or if there are multiple existing timeouts for the same
handler removed.
2009-11-17 18:39:30 -05:00
Charlie Brej
8debba60b0 [label] Operate with display set to NULL
Performing a ply_label_show with the display set to NULL allows the label to be
drawn any pixel buffer and not perform any redraw events.
2009-11-17 22:46:32 +00:00
Charlie Brej
bfaa5e9742 [label] Clean up dirty area on change of text or position
When the text or the position is changed, label will call draw events on areas
which were previously drawn on.

The two-step plugin is updated with the new method.
2009-11-17 22:03:41 +00:00
Charlie Brej
469578a974 [two-step] Add support for showing message text
Display the message text passed using the message plymouth command. This is
separate from the password prompt text.
2009-11-16 23:34:45 +00:00
Charlie Brej
7a003c41a6 [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).
2009-11-16 23:24:20 +00:00
Ray Strode
d009c99eaa [region] Add missing break statement
This meant that in some cases the region was getting trimmed to
aggresively.
2009-11-14 23:20:18 -05:00
Charlie Brej
d6b55c6801 [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.
2009-11-14 21:38:11 +00:00
Ray Strode
e0d482a7cb Revert "fasdf"
This reverts commit 92dd3083d0.
I have no idea why I commited that or pushed it.
2009-11-13 22:21:40 -05:00
Ray Strode
808e129fd1 [drm] Don't remove drm fb's that we don't know
When we access to the kernel console's fb, we don't own
it and shouldn't remove it.

Spotted by Scott James Remnant.
2009-11-12 12:48:54 -05:00
Ray Strode
a750b43584 [console] Fix ioctl call
it was doing if (!ioctl ... < 0).  Spotted by
Scott James Remnant
2009-11-12 09:15:57 -05:00
Ray Strode
fa912fbf5d [console] remove stray semicolon 2009-11-12 09:10:12 -05:00
Ray Strode
92dd3083d0 fasdf 2009-11-10 17:42:05 -05:00
Ray Strode
a30ec0193e Force terminal into raw mode on every write call
This is a76c5bc4b7 but for
text plugins.
2009-11-10 15:05:59 -05:00
Ray Strode
8e70c530ea [set-default-theme] Drop nash dependency
Now we require one of

1) /bin/plymouth being installed
2) PLYMOUTH_PLUGIN_PATH being set
3) LIB being set (for compatibility)
2009-11-03 23:31:51 -05:00
Ray Strode
5b53999611 [main] Don't add duplicate text display
Before we were adding the same text display once at start up
and once on show splash.
2009-10-29 17:12:28 -04:00
Ray Strode
ee7588b9d4 [console] Function in degraded mode when closed
Not all machines will have /dev/tty0.  Those that
don't should still work.
2009-10-29 17:11:00 -04:00
Ray Strode
0980923c85 [main] Don't unlink /dev/null
In shutdown mode we were unlinking a file that was set to /dev/null.
Removing /dev/null is a bad idea.
2009-10-29 10:05:36 -04:00
Charles Brej
a086ae755b [script] Convert example script functions to use objects
The example script had some old style function names. These still work due to
the compatibility translations, but are not recommended in new code.
2009-10-29 13:36:27 +00:00
Charlie Brej
36a1b35570 [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.
2009-10-28 20:11:47 +00:00
Ray Strode
d63a2aec8d [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.
2009-10-14 11:32:03 -04:00
Charlie Brej
e669839d66 [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.
2009-10-13 22:41:42 +01:00
Charlie Brej
e06b403ea0 [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.
2009-10-13 22:23:36 +01:00
Charlie Brej
515fdd0105 [main] Truncate output debug file
Truncates the debug file to clear any previous data. Previously, if a run had a
shorter debug data, some data from a previous run would still be present at the
end of the file.
2009-10-13 22:20:11 +01:00
Frederic Crozat
6e3ae665bc [ daemon ] handle plymouth:force-splash on kernel cmdline
When booting with init=..., plymouthd disables itself. It is problematic
when using bootchartd (bug #22180). plymouth:force-splash allows to
force plymouthd splash.

Ensure init= value is not used when starting plymouthd for shutdown.
2009-10-13 18:01:24 +02:00
Ray Strode
6547d48fde [x11] initialize head on query not map
Do it for the same reason we did it in the frame-buffer
plugin in the previous commit.  It's the "right" thing
to do and now that we map lazily, doing it the old way
is broken.
2009-10-12 19:40:08 -04:00
Ray Strode
5d631743d6 [frame-buffer] initialize head on query not map
That's the "right" thing to do and now that we
map lazily, doing it the old way is broken.
2009-10-09 17:38:17 -04:00
Ray Strode
89f07b8f81 [renderer] map buffer lazily
This is to prevent screen clears on plugins that don't
use the renderers (text plugins)
2009-10-08 17:18:41 -04:00
Ray Strode
bda90f63c1 [renderer] make map and unmap idempotent 2009-10-08 15:59:15 -04:00
Ray Strode
30fa8e2d48 [keyboard] make stop_watching_for_terminal_input idempotent 2009-10-08 15:42:27 -04:00
Ray Strode
e938daa05b [renderer] make input_source_close idempotent 2009-10-08 15:41:06 -04:00
Ray Strode
78d610e82a [main] remove displays before closing renderer 2009-10-08 15:40:16 -04:00
Ray Strode
d8835ebfd3 [terminal] Only close terminal on free when open
We were closing the terminal twice, causing assertions
to blow.
2009-10-08 15:33:40 -04:00
Ray Strode
288c110fa1 [main] Disconnect from tty when hiding splash
We were still processing keystrokes when the splash screen was
hidden. This caused problems because the tty is used by other
programs at that time.
2009-10-08 15:22:27 -04:00
Ray Strode
0bb06a8afa [drm] Destroy console buffer object on error path
We were leaking the object if it couldn't be mapped.
2009-10-07 17:26:16 -04:00
Ray Strode
3228d0534d [drm] Destroy console buffer object when done with it 2009-10-06 19:07:41 -04:00