Browse Source

Imported Upstream version 0.8.2

tags/upstream/0.8.2^0
Laurent Bigonville 7 years ago
parent
commit
b3192b7936
16 changed files with 362 additions and 50 deletions
  1. +137
    -10
      configure
  2. +40
    -1
      configure.ac
  3. +7
    -1
      scripts/plymouth-set-default-theme.in
  4. +2
    -1
      src/client/plymouth.c
  5. +60
    -2
      src/libply-splash-core/ply-boot-splash.c
  6. +1
    -1
      src/libply-splash-core/ply-terminal.c
  7. +55
    -8
      src/main.c
  8. +11
    -2
      src/plugins/renderers/drm/plugin.c
  9. +2
    -2
      src/plugins/renderers/drm/ply-renderer-i915-driver.c
  10. +4
    -4
      src/plugins/renderers/drm/ply-renderer-nouveau-driver.c
  11. +4
    -4
      src/plugins/renderers/drm/ply-renderer-radeon-driver.c
  12. +1
    -0
      src/plugins/renderers/frame-buffer/plugin.c
  13. +18
    -8
      src/plugins/splash/script/plugin.c
  14. +4
    -1
      src/plugins/splash/script/script-execute.c
  15. +14
    -3
      src/plugins/splash/script/script-lib-image.c
  16. +2
    -2
      src/plugins/splash/script/script-lib-image.script

+ 137
- 10
configure View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for plymouth 0.8.1.
# Generated by GNU Autoconf 2.63 for plymouth 0.8.2.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=plymouth>.
#
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='plymouth'
PACKAGE_TARNAME='plymouth'
PACKAGE_VERSION='0.8.1'
PACKAGE_STRING='plymouth 0.8.1'
PACKAGE_VERSION='0.8.2'
PACKAGE_STRING='plymouth 0.8.2'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=plymouth'

ac_unique_file="src/main.c"
@@ -1537,7 +1537,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures plymouth 0.8.1 to adapt to many kinds of systems.
\`configure' configures plymouth 0.8.2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

@@ -1607,7 +1607,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of plymouth 0.8.1:";;
short | recursive ) echo "Configuration of plymouth 0.8.2:";;
esac
cat <<\_ACEOF

@@ -1747,7 +1747,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
plymouth configure 0.8.1
plymouth configure 0.8.2
generated by GNU Autoconf 2.63

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1761,7 +1761,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by plymouth $as_me 0.8.1, which was
It was created by plymouth $as_me 0.8.2, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ $0 $@
@@ -5567,7 +5567,7 @@ fi

# Define the identity of the package.
PACKAGE='plymouth'
VERSION='0.8.1'
VERSION='0.8.2'


cat >>confdefs.h <<_ACEOF
@@ -13142,6 +13142,133 @@ $as_echo "yes" >&6; }
:
fi

OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $DRM_CFLAGS"
{ $as_echo "$as_me:$LINENO: checking if i915_drm.h, radeon_drm.h and nouveau_drm.h are in include path" >&5
$as_echo_n "checking if i915_drm.h, radeon_drm.h and nouveau_drm.h are in include path... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */

#include <stdint.h>
#include <stdlib.h>
#include "i915_drm.h"
#include "radeon_drm.h"
#include "nouveau_drm.h"

int
main ()
{

;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
found_drm_kernel_headers=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

found_drm_kernel_headers=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test "$found_drm_kernel_headers" = "yes"; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:$LINENO: checking if we can find them anyway" >&5
$as_echo_n "checking if we can find them anyway... " >&6; }

MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */

#include <stdint.h>
#include <stdlib.h>
#include "i915_drm.h"
#include "radeon_drm.h"
#include "nouveau_drm.h"

int
main ()
{

;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
found_drm_kernel_headers=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

found_drm_kernel_headers=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

if test "$found_drm_kernel_headers" = "yes"; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:$LINENO: error: Could not find i915_drm.h, radeon_drm.h and/or nouveau_drm.h" >&5
$as_echo "$as_me: error: Could not find i915_drm.h, radeon_drm.h and/or nouveau_drm.h" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
CFLAGS="$OLD_CFLAGS"



# Check whether --enable-tracing was given.
@@ -14169,7 +14296,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by plymouth $as_me 0.8.1, which was
This file was extended by plymouth $as_me 0.8.2, which was
generated by GNU Autoconf 2.63. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
@@ -14232,7 +14359,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
plymouth config.status 0.8.1
plymouth config.status 0.8.2
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"



+ 40
- 1
configure.ac View File

@@ -1,4 +1,4 @@
AC_INIT([plymouth],[0.8.1],[https://bugs.freedesktop.org/enter_bug.cgi?product=plymouth])
AC_INIT([plymouth],[0.8.2],[https://bugs.freedesktop.org/enter_bug.cgi?product=plymouth])
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(build-tools)
@@ -57,6 +57,45 @@ AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

PKG_CHECK_MODULES(DRM, [libdrm libdrm_intel libdrm_radeon libdrm_nouveau])

OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $DRM_CFLAGS"
AC_MSG_CHECKING([if i915_drm.h, radeon_drm.h and nouveau_drm.h are in include path])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
[[
#include <stdint.h>
#include <stdlib.h>
#include "i915_drm.h"
#include "radeon_drm.h"
#include "nouveau_drm.h"
]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no])

if test "$found_drm_kernel_headers" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_CHECKING([if we can find them anyway])

MORE_DRM_CFLAGS="-I`$PKG_CONFIG --variable includedir libdrm`/drm"
CFLAGS="$CFLAGS $MORE_DRM_CFLAGS"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
[[
#include <stdint.h>
#include <stdlib.h>
#include "i915_drm.h"
#include "radeon_drm.h"
#include "nouveau_drm.h"
]],[[]]),[found_drm_kernel_headers=yes],[found_drm_kernel_headers=no])

if test "$found_drm_kernel_headers" = "yes"; then
AC_MSG_RESULT([yes])
DRM_CFLAGS="$DRM_CFLAGS $MORE_DRM_CFLAGS"
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find i915_drm.h, radeon_drm.h and/or nouveau_drm.h])
fi
fi
CFLAGS="$OLD_CFLAGS"
AC_SUBST(DRM_CFLAGS)
AC_SUBST(DRM_LIBS)



+ 7
- 1
scripts/plymouth-set-default-theme.in View File

@@ -59,9 +59,13 @@ function read_theme_name_from_file ()
function get_default_theme ()
{
THEME_NAME=$(read_theme_name_from_file ${PLYMOUTH_CONFDIR}/plymouthd.conf)
if [ -z "$THEME_NAME" ]; then
if [ -z "$THEME_NAME" -o ! -r "${PLYMOUTH_DATADIR}/plymouth/themes/$THEME_NAME/$THEME_NAME.plymouth" ]; then
THEME_NAME=$(read_theme_name_from_file ${PLYMOUTH_POLICYDIR}/plymouthd.defaults)
fi

if [ -z "$THEME_NAME" -o ! -r "${PLYMOUTH_DATADIR}/plymouth/themes/$THEME_NAME/$THEME_NAME.plymouth" ]; then
THEME_NAME=$(basename $(readlink ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth) .plymouth)
fi
[ -z "$THEME_NAME" ] || echo $THEME_NAME && exit 1
}

@@ -176,6 +180,8 @@ if [ ! -e ${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so ]; then
exit 1
fi

[ -L ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth ] && rm -f ${PLYMOUTH_DATADIR}/plymouth/themes/default.plymouth

[ -d ${PLYMOUTH_CONFDIR} ] || mkdir -p ${PLYMOUTH_CONFDIR}
grep -q '^[[]Daemon[]]' ${PLYMOUTH_CONFDIR}/plymouthd.conf 2> /null || echo '[Daemon]' >> ${PLYMOUTH_CONFDIR}/plymouthd.conf
sed -i -e '/^Theme[[:blank:]]*=.*/d' ${PLYMOUTH_CONFDIR}/plymouthd.conf


+ 2
- 1
src/client/plymouth.c View File

@@ -24,6 +24,7 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
@@ -499,7 +500,7 @@ on_password_request (state_t *state,
NULL);

if (number_of_tries <= 0)
number_of_tries = 3;
number_of_tries = INT_MAX;

password_answer_state = calloc (1, sizeof (password_answer_state_t));
password_answer_state->state = state;


+ 60
- 2
src/libply-splash-core/ply-boot-splash.c View File

@@ -353,6 +353,62 @@ ply_boot_splash_unload (ply_boot_splash_t *splash)
splash->is_loaded = false;
}

static void
remove_displays (ply_boot_splash_t *splash)
{
ply_list_node_t *node, *next_node;

ply_trace ("removing pixel displays");

node = ply_list_get_first_node (splash->pixel_displays);
while (node != NULL)
{
ply_pixel_display_t *display;
ply_list_node_t *next_node;
unsigned long width, height;

display = ply_list_node_get_data (node);
next_node = ply_list_get_next_node (splash->pixel_displays, node);

width = ply_pixel_display_get_width (display);
height = ply_pixel_display_get_height (display);

ply_trace ("Removing %lux%lu pixel display", width, height);

if (splash->plugin_interface->remove_pixel_display != NULL)
splash->plugin_interface->remove_pixel_display (splash->plugin, display);

ply_trace ("Removing node");
ply_list_remove_node (splash->pixel_displays, node);

node = next_node;
}

ply_trace ("removing text displays");
node = ply_list_get_first_node (splash->text_displays);
while (node != NULL)
{
ply_text_display_t *display;
int number_of_columns, number_of_rows;

display = ply_list_node_get_data (node);
next_node = ply_list_get_next_node (splash->text_displays, node);

number_of_columns = ply_text_display_get_number_of_columns (display);
number_of_rows = ply_text_display_get_number_of_rows (display);

ply_trace ("Removing %dx%d text display", number_of_columns, number_of_rows);

if (splash->plugin_interface->remove_text_display != NULL)
splash->plugin_interface->remove_text_display (splash->plugin, display);

ply_trace ("Removing node");
ply_list_remove_node (splash->text_displays, node);

node = next_node;
}
}

void
ply_boot_splash_free (ply_boot_splash_t *splash)
{
@@ -374,14 +430,16 @@ ply_boot_splash_free (ply_boot_splash_t *splash)
splash);
}

remove_displays (splash);
ply_list_free (splash->pixel_displays);
ply_list_free (splash->text_displays);

if (splash->module_handle != NULL)
ply_boot_splash_unload (splash);

if (splash->idle_trigger != NULL)
ply_trigger_free (splash->idle_trigger);

ply_list_free (splash->pixel_displays);
ply_list_free (splash->text_displays);
free (splash->theme_path);
free (splash->plugin_dir);
free (splash);


+ 1
- 1
src/libply-splash-core/ply-terminal.c View File

@@ -182,7 +182,7 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal)
/* Make \n return go to the beginning of the next line */
term_attributes.c_oflag |= ONLCR;

if (tcsetattr (terminal->fd, TCSAFLUSH, &term_attributes) != 0)
if (tcsetattr (terminal->fd, TCSANOW, &term_attributes) != 0)
return false;

terminal->is_unbuffered = true;


+ 55
- 8
src/main.c View File

@@ -337,6 +337,7 @@ on_ask_for_password (state_t *state,
*/
if (state->boot_splash == NULL)
{
ply_trace ("no splash loaded, replying immediately with no password");
ply_trigger_pull (answer, NULL);
return;
}
@@ -345,6 +346,7 @@ on_ask_for_password (state_t *state,
entry_trigger->type = PLY_ENTRY_TRIGGER_TYPE_PASSWORD;
entry_trigger->prompt = prompt;
entry_trigger->trigger = answer;
ply_trace ("queuing password request with boot splash");
ply_list_append_data (state->entry_triggers, entry_trigger);
update_display (state);
}
@@ -360,6 +362,7 @@ on_ask_question (state_t *state,
entry_trigger->type = PLY_ENTRY_TRIGGER_TYPE_QUESTION;
entry_trigger->prompt = prompt;
entry_trigger->trigger = answer;
ply_trace ("queuing question with boot splash");
ply_list_append_data (state->entry_triggers, entry_trigger);
update_display (state);
}
@@ -368,6 +371,7 @@ static void
on_display_message (state_t *state,
const char *message)
{
ply_trace ("displaying message %s", message);
if (state->boot_splash != NULL)
ply_boot_splash_display_message (state->boot_splash, message);
}
@@ -379,6 +383,7 @@ on_watch_for_keystroke (state_t *state,
{
ply_keystroke_watch_t *keystroke_trigger =
calloc (1, sizeof (ply_keystroke_watch_t));
ply_trace ("watching for keystroke");
keystroke_trigger->keys = keys;
keystroke_trigger->trigger = trigger;
ply_list_append_data (state->keystroke_triggers, keystroke_trigger);
@@ -389,7 +394,9 @@ on_ignore_keystroke (state_t *state,
const char *keys)
{
ply_list_node_t *node;

ply_trace ("ignoring for keystroke");

for (node = ply_list_get_first_node (state->keystroke_triggers); node;
node = ply_list_get_next_node (state->keystroke_triggers, node))
{
@@ -407,12 +414,14 @@ on_ignore_keystroke (state_t *state,
static void
on_progress_pause (state_t *state)
{
ply_trace ("pausing progress");
ply_progress_pause (state->progress);
}

static void
on_progress_unpause (state_t *state)
{
ply_trace ("unpausing progress");
ply_progress_unpause (state->progress);
}

@@ -454,6 +463,7 @@ get_cache_file_for_mode (ply_mode_t mode)
break;
}

ply_trace ("returning cache file '%s'", filename);
return filename;
}

@@ -476,6 +486,7 @@ get_log_file_for_mode (ply_mode_t mode)
break;
}

ply_trace ("returning log file '%s'", filename);
return filename;
}

@@ -498,6 +509,7 @@ get_log_spool_file_for_mode (ply_mode_t mode)
break;
}

ply_trace ("returning spool file '%s'", filename);
return filename;
}

@@ -526,14 +538,21 @@ prepare_logging (state_t *state)
const char *logfile;

if (!state->system_initialized)
return;
{
ply_trace ("not preparing logging yet, system not initialized");
return;
}

if (state->session == NULL)
return;
{
ply_trace ("not preparing logging, no session");
return;
}

logfile = get_log_file_for_mode (state->mode);
if (logfile != NULL)
{
ply_trace ("opening log '%s'", logfile);
ply_terminal_session_open_log (state->session, logfile);

if (state->number_of_errors > 0)
@@ -614,6 +633,7 @@ static void
remove_displays_and_keyboard (state_t *state)
{
ply_list_node_t *node;
ply_trace ("removing displays and keyboard");

node = ply_list_get_first_node (state->pixel_displays);
while (node != NULL)
@@ -621,6 +641,7 @@ remove_displays_and_keyboard (state_t *state)
ply_list_node_t *next_node;
ply_pixel_display_t *display;

ply_trace ("removing pixel display");
next_node = ply_list_get_next_node (state->pixel_displays, node);
display = ply_list_node_get_data (node);
ply_pixel_display_free (display);
@@ -636,6 +657,7 @@ remove_displays_and_keyboard (state_t *state)
ply_list_node_t *next_node;
ply_text_display_t *display;

ply_trace ("removing text display");
next_node = ply_list_get_next_node (state->text_displays, node);
display = ply_list_node_get_data (node);
ply_text_display_free (display);
@@ -647,6 +669,7 @@ remove_displays_and_keyboard (state_t *state)

if (state->keyboard != NULL)
{
ply_trace ("removing keyboard");
ply_keyboard_stop_watching_for_input (state->keyboard);
ply_keyboard_free (state->keyboard);
state->keyboard = NULL;
@@ -659,10 +682,14 @@ on_show_splash (state_t *state)
bool has_display;

if (state->is_inactive)
return;
{
ply_trace ("show splash called while inactive");
return;
}

if (plymouth_should_ignore_show_splash_calls (state))
{
ply_trace ("show splash called while ignoring show splash calls");
dump_details_and_quit_splash (state);
return;
}
@@ -1182,6 +1209,22 @@ on_enter (state_t *state,
free (entry_trigger);
update_display (state);
}
else
{
for (node = ply_list_get_first_node (state->keystroke_triggers); node;
node = ply_list_get_next_node (state->keystroke_triggers, node))
{
ply_keystroke_watch_t* keystroke_trigger = ply_list_node_get_data (node);
if (!keystroke_trigger->keys || strstr(keystroke_trigger->keys, "\n")) /* assume strstr works on utf8 arrays */
{
ply_trigger_pull (keystroke_trigger->trigger, line);
ply_list_remove_node (state->keystroke_triggers, node);
free(keystroke_trigger);
return;
}
}
return;
}
}

static void
@@ -1204,7 +1247,6 @@ set_keyboard (state_t *state,
ply_keyboard_add_enter_handler (keyboard,
(ply_keyboard_enter_handler_t)
on_enter, state);
ply_keyboard_watch_for_input (keyboard);
}
static void
add_display_and_keyboard_for_terminal (state_t *state,
@@ -1379,6 +1421,8 @@ start_boot_splash (state_t *state,
return NULL;
}

ply_keyboard_watch_for_input (state->keyboard);

update_display (state);
return splash;
}
@@ -1547,7 +1591,8 @@ check_for_consoles (state_t *state,
char *console_key;
char *remaining_command_line;

ply_trace ("checking if splash screen should be disabled");
ply_trace ("checking for consoles%s",
should_add_displays? " and adding displays": "");

remaining_command_line = state->kernel_command_line;
while ((console_key = strstr (remaining_command_line, " console=")) != NULL)
@@ -1578,6 +1623,8 @@ check_for_consoles (state_t *state,
add_display_and_keyboard_for_terminal (state, state->kernel_console_tty);
}

ply_trace ("There are currently %d text displays",
ply_list_get_length (state->text_displays));
if (should_add_displays && ply_list_get_length (state->text_displays) == 0)
add_default_displays_and_keyboard (state);
}
@@ -1692,9 +1739,9 @@ on_crash (int signum)

tcgetattr (fd, &term_attributes);

term_attributes.c_iflag |= IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON;
term_attributes.c_iflag |= BRKINT | IGNPAR | ISTRIP | ICRNL | IXON;
term_attributes.c_oflag |= OPOST;
term_attributes.c_lflag |= ECHO | ECHONL | ICANON | ISIG | IEXTEN;
term_attributes.c_lflag |= ECHO | ICANON | ISIG | IEXTEN;

tcsetattr (fd, TCSAFLUSH, &term_attributes);



+ 11
- 2
src/plugins/renderers/drm/plugin.c View File

@@ -773,9 +773,11 @@ create_heads_for_active_connectors (ply_renderer_backend_t *backend)
ply_list_append_data (backend->heads, head);
}

#ifdef PLY_ENABLE_GDM_TRANSITION
/* If the driver doesn't support mapping the fb console
* then we can't get a smooth crossfade transition to
* the display manager unless we use the /dev/fb interface.
* the display manager unless we use the /dev/fb interface
* or the plymouth deactivate interface.
*
* In multihead configurations, we'd rather have working
* multihead, but otherwise bail now.
@@ -790,6 +792,7 @@ create_heads_for_active_connectors (ply_renderer_backend_t *backend)
free_heads (backend);
return false;
}
#endif

return ply_list_get_length (backend->heads) > 0;
}
@@ -883,6 +886,9 @@ ply_renderer_head_set_scan_out_buffer_to_console (ply_renderer_backend_t *backen
area.height = height;

should_set_to_black = true;
ply_trace ("Console fb is %ldx%ld and screen contents are %ldx%ld. "
"They aren't the same dimensions; forcing black",
width, height, head->area.width, head->area.height);
}
else
area = head->area;
@@ -898,6 +904,7 @@ ply_renderer_head_set_scan_out_buffer_to_console (ply_renderer_backend_t *backen
shadow_buffer = ply_pixel_buffer_get_argb32_data (head->pixel_buffer);
}

ply_trace ("Drawing %s to console fb", should_set_to_black? "black" : "screen contents");
map_address =
backend->driver_interface->begin_flush (backend->driver,
head->console_buffer_id);
@@ -911,6 +918,7 @@ ply_renderer_head_set_scan_out_buffer_to_console (ply_renderer_backend_t *backen
backend->driver_interface->unmap_buffer (backend->driver,
head->console_buffer_id);

ply_trace ("Setting scan out hardware to console fb");
ply_renderer_head_set_scan_out_buffer (backend,
head, head->console_buffer_id);

@@ -946,7 +954,8 @@ unmap_from_device (ply_renderer_backend_t *backend)

if (backend->is_active)
{
ply_trace ("scanning out directly to console");
ply_trace ("scanning out %s directly to console",
should_set_to_black? "black" : "splash");
ply_renderer_head_set_scan_out_buffer_to_console (backend, head,
should_set_to_black);
}


+ 2
- 2
src/plugins/renderers/drm/ply-renderer-i915-driver.c View File

@@ -40,8 +40,8 @@
#include <values.h>
#include <unistd.h>

#include <drm/drm.h>
#include <drm/i915_drm.h>
#include <drm.h>
#include <i915_drm.h>
#include <intel_bufmgr.h>
#include <xf86drm.h>
#include <xf86drmMode.h>


+ 4
- 4
src/plugins/renderers/drm/ply-renderer-nouveau-driver.c View File

@@ -40,10 +40,10 @@
#include <values.h>
#include <unistd.h>

#include <drm/drm.h>
#include <drm/nouveau_drm.h>
#include <drm/nouveau_drmif.h>
#include <nouveau/nouveau_bo.h>
#include <drm.h>
#include <nouveau_drm.h>
#include <nouveau_drmif.h>
#include <nouveau_bo.h>
#include <xf86drm.h>
#include <xf86drmMode.h>



+ 4
- 4
src/plugins/renderers/drm/ply-renderer-radeon-driver.c View File

@@ -40,10 +40,10 @@
#include <values.h>
#include <unistd.h>

#include <drm/drm.h>
#include <drm/radeon_drm.h>
#include <drm/radeon_bo.h>
#include <drm/radeon_bo_gem.h>
#include <drm.h>
#include <radeon_drm.h>
#include <radeon_bo.h>
#include <radeon_bo_gem.h>
#include <xf86drm.h>
#include <xf86drmMode.h>



+ 1
- 0
src/plugins/renderers/frame-buffer/plugin.c View File

@@ -261,6 +261,7 @@ create_backend (const char *device_name,
ply_trace ("creating renderer backend for device %s", backend->device_name);

backend->loop = ply_event_loop_get_default ();
backend->head.map_address = MAP_FAILED;
backend->heads = ply_list_new ();
backend->input_source.key_buffer = ply_buffer_new ();
backend->terminal = terminal;


+ 18
- 8
src/plugins/splash/script/plugin.c View File

@@ -74,6 +74,7 @@ struct _ply_boot_splash_plugin
ply_event_loop_t *loop;
ply_boot_splash_mode_t mode;
ply_list_t *displays;
ply_keyboard_t *keyboard;

char *script_filename;
char *image_dir;
@@ -93,7 +94,9 @@ struct _ply_boot_splash_plugin
static void detach_from_event_loop (ply_boot_splash_plugin_t *plugin);
static void stop_animation (ply_boot_splash_plugin_t *plugin);
ply_boot_splash_plugin_interface_t *ply_boot_splash_plugin_get_interface (void);

static void on_keyboard_input (ply_boot_splash_plugin_t *plugin,
const char *keyboard_input,
size_t character_size);

static void
pause_displays (ply_boot_splash_plugin_t *plugin)
@@ -221,6 +224,10 @@ start_script_animation (ply_boot_splash_plugin_t *plugin)
script_return_t ret = script_execute (plugin->script_state,
plugin->script_main_op);
script_obj_unref (ret.object);
if (plugin->keyboard != NULL)
ply_keyboard_add_input_handler (plugin->keyboard,
(ply_keyboard_input_handler_t)
on_keyboard_input, plugin);
on_timeout (plugin);

return true;
@@ -256,6 +263,14 @@ stop_script_animation (ply_boot_splash_plugin_t *plugin)
(ply_event_loop_timeout_handler_t)
on_timeout, plugin);

if (plugin->keyboard != NULL)
{
ply_keyboard_remove_input_handler (plugin->keyboard,
(ply_keyboard_input_handler_t)
on_keyboard_input);
plugin->keyboard = NULL;
}

script_state_destroy (plugin->script_state);
script_lib_sprite_destroy (plugin->script_sprite_lib);
script_lib_image_destroy (plugin->script_image_lib);
@@ -311,19 +326,14 @@ static void
set_keyboard (ply_boot_splash_plugin_t *plugin,
ply_keyboard_t *keyboard)
{

ply_keyboard_add_input_handler (keyboard,
(ply_keyboard_input_handler_t)
on_keyboard_input, plugin);
plugin->keyboard = keyboard;
}

static void
unset_keyboard (ply_boot_splash_plugin_t *plugin,
ply_keyboard_t *keyboard)
{
ply_keyboard_remove_input_handler (keyboard,
(ply_keyboard_input_handler_t)
on_keyboard_input);
plugin->keyboard = NULL;
}

static void


+ 4
- 1
src/plugins/splash/script/script-execute.c View File

@@ -324,7 +324,10 @@ static script_obj_t *script_evaluate_func (script_state_t *state,
{
func_obj = script_obj_hash_peek_element (state->this, name);
if (func_obj)
this_obj = state->this;
{
this_obj = state->this;
script_obj_ref(this_obj);
}
else
{
func_obj = script_obj_hash_peek_element (state->global, name);


+ 14
- 3
src/plugins/splash/script/script-lib-image.c View File

@@ -158,6 +158,7 @@ static script_return_t image_text (script_state_t *state,
script_lib_image_data_t *data = user_data;
ply_pixel_buffer_t *image;
ply_label_t *label;
script_obj_t *alpha_obj;
int width, height;
char *text = script_obj_hash_get_string (state->local, "text");
@@ -166,12 +167,21 @@ static script_return_t image_text (script_state_t *state,
float red = CLAMP(script_obj_hash_get_number (state->local, "red"), 0, 1);
float green = CLAMP(script_obj_hash_get_number (state->local, "green"), 0, 1);
float blue = CLAMP(script_obj_hash_get_number (state->local, "blue"), 0, 1);
float alpha = 1;

alpha_obj = script_obj_hash_peek_element (state->local, "alpha");

if (alpha_obj)
{
alpha = CLAMP(script_obj_as_number (alpha_obj), 0, 1);
script_obj_unref(alpha_obj);
}

if (!text) return script_return_obj_null ();
label = ply_label_new ();
ply_label_set_text (label, text);
ply_label_set_color (label, red, green, blue, 1.0);
ply_label_set_color (label, red, green, blue, alpha);
ply_label_show (label, NULL, 0, 0);
width = ply_label_get_width (label);
@@ -233,6 +243,7 @@ script_lib_image_data_t *script_lib_image_setup (script_state_t *state,
"red",
"green",
"blue",
"alpha",
NULL);

script_obj_unref (image_hash);


+ 2
- 2
src/plugins/splash/script/script-lib-image.script View File

@@ -14,9 +14,9 @@ Image.Scale = fun (width, height)
return Image.Adopt (this._Scale(width, height));
};

Image.Text = fun (text, red, green, blue)
Image.Text = fun (text, red, green, blue, alpha)
{
return Image.Adopt (Image._Text (text, red, green, blue));
return Image.Adopt (Image._Text (text, red, green, blue, alpha));
};

Image |= fun (filename)


Loading…
Cancel
Save