|
From: Antonino D. <ad...@po...> - 2003-03-17 14:28:11
|
On Mon, 2003-03-17 at 21:47, Geert Uytterhoeven wrote: > > IMHO always using an image depth of 8 is fine. That's a nice trade off between > genericity and easy access of image data. > > Except for monochrome, there I prefer a depth of 1, since doing 1->8 and 8->1 > in a row is a bit too wasteful. > An exception to the rule :-) Well, I guess if it will significantly benefit monochrome drivers... > BTW, I just realized there's no need to distinguish between monochrome copy and > monochrome-to-color expansion. The monochrome logo code just has to write the > correct values to fb_image.[fb]gcolor. I.e. all zeroes or all ones (number of > bits = var.bits_per_pixel, so it works for 8-bit monochrome, too). > I remember mentioning this to you before, and you said that there might be rare cases that fgcolor can be equal to bgcolor. However, using -1 instead for bg_color/fg_color may work, at least for the current setup and only for monochrome, (except perhaps 32-bit monochrome, if there is such a thing) I still prefer splitting fb_imageblit() into two though, and still keep image->depth for logo drawing only, to allow for future expansion. . > > Do we still use the LUT? > > Yes. An alternative is to enlarge the pseudo palette to 256 entries (if there Yes. Which also means logo drawing will also work for quirky drivers, and the upper layer will be finally totally independent of the low level drivers. > are enough number of colors). But since imageblit is done for the logo only, > doing the transform from LUT index to pixel value in imageblit is OK, I think. > Yes, I also prefer referring to the LUT whatever the format even for character drawing. I don't expect any noticeable performance penalty except for logo drawing. The way it's currently done is because, looking at all drivers, not one fills up the pseudo_palette when bpp <= 8. Tony |