Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <e94_msu@elixir.e.kth.se>
To : ggi-develop@eskimo.com
Date: Wed, 12 Aug 1998 22:15:02 +0200
Re: LibGGI colormapping
> Marcus writes:
>
> > > date: 1998/08/12 08:08:34; author: ajapted; state: dead; lines: +0 -0
> > > Removed fillscreen.c files -- they were either 1) broken (WRT stride) or
> > > 2) no faster than using DrawBox()
> >
> > You should have looked closer at those files.
>
> Sorry, I got carried away :-(. I will put it all back if you like, but
> maybe it would be better to optimize DrawBox for the width == (stride/Bpp)
> case ?
Yep, adding an optimized drawbox to the linear-* libs is better. Having a
fillscreen that does anything other than calling
drawbox(vis,0,0,GGI_MODE(vis)->virt.x,GGI_MODE(vis)->virt.y)
is pretty useless unless fillscreen can be HW accelerated.
> > We should probably have some "altered range" fields too, like the
> > X-targets do, so that targets can see when the palette has been
> > changed, and what entries have been changed.
>
> I'm not following you here. What exactly do you mean ?
Look at this code from display/X/mode.c:
if (xhook->cmap && xhook->cmap_first<xhook->cmap_last) {
int x;
XColor xcol;
for(x=xhook->cmap_first;x<xhook->cmap_last;x++)
{
xcol.red =xhook->colormap[x].r;
xcol.green=xhook->colormap[x].g;
xcol.blue =xhook->colormap[x].b;
xcol.pixel=x;
xcol.flags= DoRed | DoGreen | DoBlue ;
XStoreColor(xhook->display, xhook->cmap,&xcol);
}
xhook->cmap_first=256;
xhook->cmap_last=0;
XSetWindowColormap(xhook->display, xhook->window, xhook->cmap);
}
With the new system xhook->colormap will be vis->palette, and what I
meant was that the cmap_first and cmap_last entries should be in the
ggi_visual struct too, and that the stub GGIsetpalvec (hmm, maybe we
should remove the "vec" from the internal names too, for consistency :)
should do:
if ( start < xhook->cmap_first ) xhook->cmap_first = start;
if ( start+len > xhook->cmap_last ) xhook->cmap_last = start+len;
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: e94_msu@e.kth.se
Index:
[thread]
[date]
[subject]
[author]