]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Revert "two-step: fix unlock screen" and "two-step: introduce delayed startup"
authorRay Strode <rstrode@redhat.com>
Fri, 10 Jan 2014 15:46:25 +0000 (10:46 -0500)
committerRay Strode <rstrode@redhat.com>
Fri, 10 Jan 2014 19:15:44 +0000 (14:15 -0500)
This reverts commits 540ae58fe02600b73a17c7fd80f2fdce42c7087e and 17976ac53807d93d9e240e85fe0e1e8ea3fab730.

I want to implement the feature more generally, and the current
implementation has bugs when toggling to details and back.

src/plugins/splash/two-step/plugin.c

index 773e9bf4ec85f3cee4f968bd46e0528c5c648931..f48b41e1a16c46cf6cccb9fa2e053312dd9cb728 100644 (file)
@@ -92,8 +92,6 @@ typedef struct
   ply_rectangle_t box_area, lock_area, watermark_area;
   ply_trigger_t *end_trigger;
   ply_image_t *background_image;
-
-  uint32_t is_blank : 1;
 } view_t;
 
 struct _ply_boot_splash_plugin
@@ -128,9 +126,6 @@ struct _ply_boot_splash_plugin
   ply_trigger_t *idle_trigger;
   ply_trigger_t *stop_trigger;
 
-  double start_time;
-  double startup_delay;
-
   uint32_t root_is_mounted : 1;
   uint32_t is_visible : 1;
   uint32_t is_animating : 1;
@@ -172,7 +167,6 @@ view_new (ply_boot_splash_plugin_t *plugin,
 
   view->label = ply_label_new ();
   view->message_label = ply_label_new ();
-  view->is_blank = true;
 
   return view;
 }
@@ -527,7 +521,6 @@ create_plugin (ply_key_file_t *key_file)
 {
   ply_boot_splash_plugin_t *plugin;
   char *image_dir, *image_path;
-  char *startup_delay;
   char *alignment;
   char *transition;
   char *transition_duration;
@@ -537,8 +530,6 @@ create_plugin (ply_key_file_t *key_file)
   srand ((int) ply_get_timestamp ());
   plugin = calloc (1, sizeof (ply_boot_splash_plugin_t));
 
-  plugin->start_time = ply_get_timestamp ();
-
   image_dir = ply_key_file_get_value (key_file, "two-step", "ImageDir");
 
   ply_trace ("Using '%s' as working directory", image_dir);
@@ -569,13 +560,6 @@ create_plugin (ply_key_file_t *key_file)
 
   plugin->animation_dir = image_dir;
 
-  startup_delay = ply_key_file_get_value (key_file, "two-step", "StartupDelay");
-  if (startup_delay != NULL)
-    plugin->startup_delay = strtod (startup_delay, NULL);
-  else
-    plugin->startup_delay = 5.0;
-  free (startup_delay);
-
   alignment = ply_key_file_get_value (key_file, "two-step", "HorizontalAlignment");
   if (alignment != NULL)
     plugin->animation_horizontal_alignment = strtod (alignment, NULL);
@@ -919,36 +903,6 @@ on_draw (view_t                   *view,
 
   plugin = view->plugin;
 
-  if (plugin->mode == PLY_BOOT_SPLASH_MODE_BOOT_UP)
-    {
-      double now;
-
-      now = ply_get_timestamp ();
-
-      if ((now - plugin->start_time < plugin->startup_delay) &&
-          plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
-        return;
-
-      if (view->is_blank)
-        {
-          ply_rectangle_t clip_area;
-
-          x = 0;
-          y = 0;
-          width = ply_pixel_display_get_width (view->display);
-          height = ply_pixel_display_get_height (view->display);
-
-          clip_area.x = 0;
-          clip_area.y = 0;
-          clip_area.width = width;
-          clip_area.height = height;
-          ply_pixel_buffer_pop_clip_area (pixel_buffer);
-          ply_pixel_buffer_push_clip_area (pixel_buffer,
-                                           &clip_area);
-          view->is_blank = false;
-        }
-    }
-
   draw_background (view, pixel_buffer, x, y, width, height);
 
   ply_pixel_buffer_get_size (pixel_buffer, &screen_area);