Commit graph

1238 commits

Author SHA1 Message Date
Charlie Brej
9df80dc483 [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.
2009-11-22 22:53:12 +00:00
Charlie Brej
b7c34f1857 [region] Break circular dependency using an extra variable
new_area->width depends on new_area->x and vice versa. Break the dependency by
adding a temp variable.
2009-11-22 22:47:40 +00:00
Charlie Brej
dc11571049 [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.
2009-11-22 22:42:13 +00:00
Charlie Brej
645452c099 [region] Overlap top right edge lower rectangle starts right of the old
Probably a typo in the original version.
2009-11-22 22:30:58 +00:00
Charlie Brej
fe46fb8803 [region] Free rectangle if empty
Previously we just returned and did not free.
2009-11-22 22:27:40 +00:00
Charlie Brej
3f2e0b1b22 [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.
2009-11-22 22:21:49 +00:00
Charlie Brej
338ed12168 [region] Clarify the testing code
The grids show which parts were not covered, or over covered.
2009-11-22 22:12:58 +00:00
Charlie Brej
f506b1e54d [region] Added test program
This examines the behaviour for correct behavious and performance.
2009-11-22 21:42:12 +00:00
Charlie Brej
6cdb6e330a [script] Fix typo in SetBackgroundBottomColor function name
This is in the compatibility wrappers so it didn't effect anything..
2009-11-22 21:19:52 +00:00
Charlie Brej
d876853867 [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.
2009-11-21 22:35:55 +00:00
Charlie Brej
57fb558046 [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
2009-11-21 17:45:41 +00:00
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