From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NZhSL-0006ql-1k for mharc-grub-devel@gnu.org; Tue, 26 Jan 2010 04:11:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZhSG-0006oR-Vd for grub-devel@gnu.org; Tue, 26 Jan 2010 04:11:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZhSC-0006m7-4p for grub-devel@gnu.org; Tue, 26 Jan 2010 04:11:24 -0500 Received: from [199.232.76.173] (port=56516 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZhSC-0006m4-0J for grub-devel@gnu.org; Tue, 26 Jan 2010 04:11:20 -0500 Received: from mail-bw0-f215.google.com ([209.85.218.215]:54735) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZhSB-0006Oe-IE for grub-devel@gnu.org; Tue, 26 Jan 2010 04:11:19 -0500 Received: by bwz7 with SMTP id 7so1207127bwz.26 for ; Tue, 26 Jan 2010 01:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=tctWtDpAYynHWv4Y3IC4j9bvKyEaMg3PmjIG3+bb3Wo=; b=IfUJmfANeNhbR/PsT34jRmhwQYj50M1pxYHqxxlRR6OEepSH32fqN+uYMm6l2TuIfO jZbaGdS6da9orTf8ClSolAfEWdV1U75ModI5k4dwU3pJlt4mmsiRXjTIe6OgpAUvmV3C gXtxR5TDtRVnSsLFS43+q3MCb1NzkhrE6xvWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=BKKMGosAOGK/ZLAUnXuikHQAevrsf6UXOoq1OL1S4Dz+7926fFI97YUQGU9JZZPOup MCeMxkm7deoXC0FlKSawWcqViduIPcLAwJ/PvHp9iWNjcE7wxSO2xLaHkVxHGFLlT2XN AH5Ay8+1W52O56U9n6QtybJsLnNfjV0gYvucc= Received: by 10.204.10.9 with SMTP id n9mr654788bkn.41.1264497077877; Tue, 26 Jan 2010 01:11:17 -0800 (PST) Received: from debian.bg45.phnet (gprs33.swisscom-mobile.ch [193.247.250.33]) by mx.google.com with ESMTPS id 14sm2535628bwz.13.2010.01.26.01.11.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 01:11:16 -0800 (PST) Message-ID: <4B5EB1A5.5040200@gmail.com> Date: Tue, 26 Jan 2010 10:11:01 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <4B585690.8090602@gmail.com> <1264160815.29881.61.camel@EK> In-Reply-To: <1264160815.29881.61.camel@EK> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig997A5096B81F77FD34657FBF" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Antialiased fonts patch. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2010 09:11:25 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig997A5096B81F77FD34657FBF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Evgeny Kolesnikov wrote: > Here is the path for anti-aliased fonts. > > =20 At first I was completely against antialiasing support because of performance impact. But it being optional decreases the later. However there is one problem: your patch relies on text_layer to be RGBA8888 which was a mistake. RGBA8888 for text layer is vastly inefficient especially on 16-bit framebuffer and CPUs with small cache. I had plans to switch it to indexed color. Do you really need 8bits and 4 aren't enough? If 4 are enough we could make text_layer IA44 (indexed-4 bits, alpha 4 bits) if you need 8 bits we can do IA88. I'm not sure which one is faster: firs one is more cache-efficient, second one requires less ALU. Are you interested in implementing this? > Everything my path does is: > > 1) Enriches grub-mkfont with ability to write (and debug with -vv)=20 > pff3 (as I call it now) font format. There are 2 differences between > pff2 and pff3 formats: FILE magic (PFF2 becomes PFF3) and DATA block > entires size multiples by 8 (1bit -> 8bit). In other words PFF3 stores > 8-bit alpha channel instead of 1-bit. > And grub-mkfont will still be able to generate pff2, of course. > > =20 And by default grub-mkfont should generate not antialiased font for performance reasons. But user or theme creator can choose to use antialiased fonts if they wish. > 2) Adds pff3 format parsing and drawing ability to font.c. > And of course pff2 still there; actually as you can understand 95% of > code is reused because of such a little differences in formats. > > Drawing itself implemented pretty straightforward: on each glyph > drawing A channel (from glyph) and foreground color are converted to > RGBA buffer and then blended in RGBA_8888 mode. > > As far as I understand writing custom blitter for now will not worth it= > in terms of efficiency. > > =20 > When I test it I was unable to see performance difference between 1-bit= > fonts and my version. They both flickers a little. > > Files affected: /font/font.c and /util/grub-mkfont.c. > > =20 > -----------------------------------------------------------------------= - > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig997A5096B81F77FD34657FBF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAktesa8ACgkQNak7dOguQgleZAD/e5JICTYv1BLX9cfoXveL4TOQ OyVQFk0wZTq0yVnYvrkA/3Dmsb4q9lljFkumsO27JRRq3tfKjBmgzXHUoui8IvLq =MeR9 -----END PGP SIGNATURE----- --------------enig997A5096B81F77FD34657FBF--