mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 4/8] splash command: simplify offscreen rendering
Date: Fri,  7 Aug 2015 15:45:37 +0200	[thread overview]
Message-ID: <1438955141-8850-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1438955141-8850-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/splash.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/commands/splash.c b/commands/splash.c
index 90f0a0c..29e30ae 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -18,6 +18,7 @@ static int do_splash(int argc, char *argv[])
 	int offscreen = 0;
 	u32 bg_color = 0x00000000;
 	bool do_bg = false;
+	void *buf;
 
 	memset(&s, 0, sizeof(s));
 
@@ -58,15 +59,11 @@ static int do_splash(int argc, char *argv[])
 		return PTR_ERR(sc);
 	}
 
-	if (sc->offscreenbuf) {
-		if (do_bg)
-			gu_memset_pixel(sc->info, sc->offscreenbuf, bg_color,
-					sc->s.width * sc->s.height);
-		else
-			memcpy(sc->offscreenbuf, sc->fb, sc->fbsize);
-	} else if (do_bg) {
-		gu_memset_pixel(sc->info, sc->fb, bg_color, sc->s.width * sc->s.height);
-	}
+	buf = gui_screen_render_buffer(sc);
+
+	if (do_bg)
+		gu_memset_pixel(sc->info, buf, bg_color,
+				sc->s.width * sc->s.height);
 
 	ret = image_renderer_file(sc, &s, image_file);
 	if (ret > 0)
-- 
2.4.6


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-08-07 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 13:45 [PATCH] fbconsole updates Sascha Hauer
2015-08-07 13:45 ` [PATCH 1/8] video: fbconsole: do not enter when we are already in fbconsole Sascha Hauer
2015-08-07 13:45 ` [PATCH 2/8] fb: return original fb_info in FBIOGET_SCREENINFO Sascha Hauer
2015-08-07 13:45 ` [PATCH 3/8] fb: Add shadowfb support Sascha Hauer
2015-08-07 13:45 ` Sascha Hauer [this message]
2015-08-07 13:45 ` [PATCH 5/8] gui: Use fb provided shadowfb for offscreen rendering Sascha Hauer
2015-08-07 13:45 ` [PATCH 6/8] gui: implement blitting screen areas Sascha Hauer
2015-08-07 13:45 ` [PATCH 7/8] fb: fbconsole: print cursor after clearing the screen Sascha Hauer
2015-08-07 13:45 ` [PATCH 8/8] fb: fbconsole: Add missing blits Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438955141-8850-5-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox