konradr / rpms / grub2

Forked from rpms/grub2 6 years ago
Clone
31004e6
From 3cc0a7193fb4eb6fcfb9698b6a84c5df57349ab8 Mon Sep 17 00:00:00 2001
31004e6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
31004e6
Date: Thu, 2 May 2013 14:34:13 +0200
f74b50e
Subject: [PATCH 400/482] 	* grub-core/commands/videotest.c: Reduce
31004e6
 flickering and draw 6 squares 	instead of 2 to have full RGB/CMY test
31004e6
 pattern.
31004e6
31004e6
---
31004e6
 ChangeLog                      |  5 +++++
31004e6
 grub-core/commands/videotest.c | 43 ++++++++++++++++++++++++++----------------
31004e6
 2 files changed, 32 insertions(+), 16 deletions(-)
31004e6
31004e6
diff --git a/ChangeLog b/ChangeLog
31004e6
index 642858c..b202abe 100644
31004e6
--- a/ChangeLog
31004e6
+++ b/ChangeLog
31004e6
@@ -1,3 +1,8 @@
31004e6
+2013-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
+
31004e6
+	* grub-core/commands/videotest.c: Reduce flickering and draw 6 squares
31004e6
+	instead of 2 to have full RGB/CMY test pattern.
31004e6
+
31004e6
 2013-04-30  Vladimir Serbinenko  <phcoder@gmail.com>
31004e6
 
31004e6
 	Add few more tests.
31004e6
diff --git a/grub-core/commands/videotest.c b/grub-core/commands/videotest.c
31004e6
index 2256237..b6c181b 100644
31004e6
--- a/grub-core/commands/videotest.c
31004e6
+++ b/grub-core/commands/videotest.c
31004e6
@@ -49,7 +49,6 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
31004e6
   if (grub_strcmp (cmd->name, "vbetest") == 0)
31004e6
     grub_dl_load ("vbe");
31004e6
 #endif
31004e6
-
31004e6
   mode = grub_env_get ("gfxmode");
31004e6
   if (argc)
31004e6
     mode = args[0];
31004e6
@@ -155,26 +154,38 @@ grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
31004e6
 
31004e6
   grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
31004e6
 
31004e6
-  for (i = 0; i < 2; i++)
31004e6
+  for (i = 0; i < 5; i++)
31004e6
     {
31004e6
-      color = grub_video_map_rgb (0, 0, 0);
31004e6
-      grub_video_fill_rect (color, 0, 0, width, height);
31004e6
 
31004e6
-      color = grub_video_map_rgb (255, 0, 0);
31004e6
-      grub_video_fill_rect (color, 0, 0, 100, 100);
31004e6
+      if (i == 0 || i == 1)
31004e6
+	{	  
31004e6
+	  color = grub_video_map_rgb (0, 0, 0);
31004e6
+	  grub_video_fill_rect (color, 0, 0, width, height);
31004e6
 
31004e6
-      color = grub_video_map_rgb (0, 255, 255);
31004e6
-      grub_video_fill_rect (color, 100, 100, 100, 100);
31004e6
+	  color = grub_video_map_rgb (255, 0, 0);
31004e6
+	  grub_video_fill_rect (color, 0, 0, 100, 100);
31004e6
 
31004e6
-      grub_video_set_viewport (x + 150, y + 150,
31004e6
-			       width - 150 * 2, height - 150 * 2);
31004e6
-      color = grub_video_map_rgb (77, 33, 77);
31004e6
-      grub_video_fill_rect (color, 0, 0, width, height);
31004e6
-      grub_video_swap_buffers ();
31004e6
-    }
31004e6
+	  color = grub_video_map_rgb (0, 255, 0);
31004e6
+	  grub_video_fill_rect (color, 100, 0, 100, 100);
31004e6
+
31004e6
+	  color = grub_video_map_rgb (0, 0, 255);
31004e6
+	  grub_video_fill_rect (color, 200, 0, 100, 100);
31004e6
+
31004e6
+	  color = grub_video_map_rgb (0, 255, 255);
31004e6
+	  grub_video_fill_rect (color, 0, 100, 100, 100);
31004e6
+
31004e6
+	  color = grub_video_map_rgb (255, 0, 255);
31004e6
+	  grub_video_fill_rect (color, 100, 100, 100, 100);
31004e6
+
31004e6
+	  color = grub_video_map_rgb (255, 255, 0);
31004e6
+	  grub_video_fill_rect (color, 200, 100, 100, 100);
31004e6
+
31004e6
+	  grub_video_set_viewport (x + 150, y + 150,
31004e6
+				   width - 150 * 2, height - 150 * 2);
31004e6
+	  color = grub_video_map_rgb (77, 33, 77);
31004e6
+	  grub_video_fill_rect (color, 0, 0, width, height);
31004e6
+	}
31004e6
 
31004e6
-  for (i = 0; i < 5; i++)
31004e6
-    {
31004e6
       color = grub_video_map_rgb (i, 33, 77);
31004e6
       grub_video_fill_rect (color, 0, 0, width, height);
31004e6
       grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, 0, 0,
31004e6
-- 
31004e6
1.8.2.1
31004e6