Quoting Monge Maurizio ([EMAIL PROTECTED]):
> Alle 15:43, luned� 28 luglio 2003, hai scritto:
> > Quoting Monge Maurizio ([EMAIL PROTECTED]):
> > > Third, it could be nice that a window with alpha channel could decide of
> > > not receiving mouse event where alpha = 0, with this shaped window can be
> > > implemented in Qt and receive selected events. Al that can be realized
> > > with the attached patch, that add the "DWOP_SHAPED" flag (to be used with
> > > DWOP_ALPHACHANNEL)
> >
> > I was thinking of that some time ago. Unfortunately the locking to read one
> > pixel for each mouse movement may be too much overhead and a faster
> > solution should be thought about.
> 
> Anyway for each mouse movent there is "rebuild_stack" for the mouse window, 
> that i guess to be much more exepensive, isn't it?

Of course, you are right. I forgot about that ;)

> If the surface is in system mem reading pixels is not expensive.

I only worried about the locking, but I'm no longer concerned.

> Since reading a pixel is so fast, for every surface there could be lock flag 
> (just a var in mem, no locking object) that if set lock will lock the surface 
> manager. If a surface has to be moved and the flag is set the surface manager
> will shed_yield until the var is unset again (that should happan immediately).
> This solution makes expensive waiting for lock, but makes very fast 
> lock/unlock, and this could be perfect for reading 1 pixel.

The surfaces already have a soft (var) lock counter.
The surface manager won't kick out buffers with a non-zero lock counter.
Doing shed_yield() is unwise, especially with Linux 2.5, but the possibility
of long-time locks forbids this anyways.

> > I will apply the patch now. However, DWOP_SHAPED has to be implemented for
> > color keyed windows, too. You should think about using the primary
> > pixelformat (pixel format of the layer, i.e. no DWCAPS_ALPHACHANNEL). You
> > can implement shaped windows via color keying then which is way faster and
> > consumes less video memory. XDirectFB uses color keying for shaped windows.
> 
> True.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to