mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] [JUST DEMO] commands: implement 'fbputs' command
Date: Mon, 26 Jan 2015 09:14:20 +0100	[thread overview]
Message-ID: <20150126081420.GH12209@pengutronix.de> (raw)
In-Reply-To: <1422195690-20676-1-git-send-email-antonynpavlov@gmail.com>

On Sun, Jan 25, 2015 at 05:21:30PM +0300, Antony Pavlov wrote:
> Mainline barebox at the moment has no framebuffer
> console support.
> The 'fbputs' demo command displays a text string
> on fb device.
> 
> This quick-n-dirty patch demonstates that barebox
> framebuffer console can be easely realized.
> 
> I'm awaiting your comments!

Unfortunately real console support is not that simple, we would have to
parse ANSI escape sequences up to some point to make it generally usable.

Jean Christophe has framebuffer console patches, he'll probably comment
on this one aswell.
Personally I would be fine with your simple approach until real console
support arrives.

> +static void drawchar(struct screen *sc, int x, int y, char c)
> +{
> +	void *buf;
> +
> +	buf = gui_screen_redering_buffer(sc);
> +
> +	rgba_blend(&sc->info, chars[(int)c],
> +		buf, VIDEO_FONT_HEIGHT, VIDEO_FONT_WIDTH,
> +		VIDEO_FONT_WIDTH * x, VIDEO_FONT_HEIGHT * y, 1);

Is this performant enough? I would assume the whole character set should
be prerendered for the actual framebuffer format before printing a
string.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2015-01-26  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25 14:21 Antony Pavlov
2015-01-26  8:14 ` Sascha Hauer [this message]
2015-01-26  8:55   ` Jean-Christophe PLAGNIOL-VILLARD
2015-01-26  9:20     ` Antony Pavlov
2015-02-02  8:46     ` Antony Pavlov
2015-02-02 21:28 ` Alexander Aring

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=20150126081420.GH12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --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