Re: Problems while writing a Composite Manager with Damage, Render, XFixes and Composite

2009-07-17 Thread Barry Scott
Arnaud Fontaine wrote:
>> Barry Scott  writes:
>> 
>
> Hi,
>
> > There  are cases when  you get notify  about damage in  a drawable
> > that has gone by the time you deal with the damage.
>
> > Read the  Compiz sources to see how it  deals this these problems,
> > thats what we ended up doing.
>
> Thanks  for  your reply.  Well,  once  a  DestroyNotify event  has  been
> received, I  guess I can assume  that the Damage object  has been freed,
> no?
>
>   
Sorry I do not have the time at the moment to look at what we did. But 
as I said
we learned a huge amount from reading Compiz source.

Barry

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Problems while writing a Composite Manager with Damage, Render, XFixes and Composite

2009-07-16 Thread Arnaud Fontaine
> Barry Scott  writes:

Hi,

> There  are cases when  you get notify  about damage in  a drawable
> that has gone by the time you deal with the damage.

> Read the  Compiz sources to see how it  deals this these problems,
> thats what we ended up doing.

Thanks  for  your reply.  Well,  once  a  DestroyNotify event  has  been
received, I  guess I can assume  that the Damage object  has been freed,
no?

Cheers,
Arnaud Fontaine
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Problems while writing a Composite Manager with Damage, Render, XFixes and Composite

2009-07-16 Thread Barry Scott
Arnaud Fontaine wrote:
> Hello,
>
> Any ideas or opinions?
>   
There are cases when you get notify about damage in a drawable
that has gone by the time you deal with the damage.

Read the Compiz sources to see how it deals this these problems, thats
what we ended up doing.

Barry

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Re: Problems while writing a Composite Manager with Damage, Render, XFixes and Composite

2009-07-15 Thread Arnaud Fontaine
Hello,

Any ideas or opinions?

Cheers,
Arnaud Fontaine


pgpD8APCGtlUX.pgp
Description: PGP signature
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Problems while writing a Composite Manager with Damage, Render, XFixes and Composite

2009-07-13 Thread Arnaud Fontaine
Hello,

I'm currently  writing a Composite  Manager with XCB as  an university
project[0]. I'm using  a library for EWMH[1] I  have written and which
has not been committed yet to xcb-util because it is not finished yet.

I read xcompmgr code along  with the extensions specifications to figure
out how all these extensions interacts together.  At the moment, I'm not
writing the code from a performance point of view, so I'm just trying to
stick to the minimum features and especially to make it work.

However, I  have the  following problems and  I really can't  figure out
what's wrong (the main code is in render.c for Render related functions,
window.c and event.c):

1/  When receiving  a DestroyNotify  event, I  use DamageDestroy  on the
   previously created damage object but  I get a BadDamage error whereas
   it  is the same  damage object  identifier from  its creation  to the
   DamageDestroy request.

2/ I  don't have  any problem when  starting the Composite  Manager when
   windows already  exist (e.g.  existing  are correctly painted  on the
   screen), but it does not work  when trying to paint new window on the
   screen (I don't  get any error though).  Basically,  my code does the
   following:

   1) Initialization (working fine):

 a)  RenderCreatePicture with  the root  window identifier  and with
SubwindowMode equals to  IncludeInferiors and assigned to global
variable globalconf.root_picture.

 b) Get the  root background pixmap, if there is  none, create a new
pixmap  of  1x1  pixels,  then RenderCreatePicture  with  Repeat
equals  to true,  then  fill it  with RenderFillRectangles,  and
assigned to a global variable
globalconf.root_background_picture.

 c) RenderComposite from b) to a).
   
   2) When a CreateNotify event is received:

  a) DamageCreate on the new window identifier.

   3) When a MapNotify event is received:

  a) Set the map state to Viewable.
  b) Get the window pixmap with CompositeNameWindowPixmap.
   
   4) When a DamageNotify is received:

  a) Set the window as damaged.
   
   5) Paint all the windows:

  a) RenderComposite from 1b) to 1a) in order to repaint the screen.
  b) RenderCreatePicture on the pixmap 3b).
  c) RenderComposite from b) to 1a).
   
Is there  anything wrong  in these  requests? I think  I may  have not
understood an  important concept but I  can't figure out  which one. I
have not used  XFixes for now because I don't really  know when to use
it because  as far  as I have  understood, XFixes would  avoid useless
copy of pixels.  I'm also a bit confused  about DamageSubtract too and
don't know exactly when it would be useful (for handling opacity?).

Thank you very much in advance for your answers.

Regards,
Arnaud Fontaine

[0] http://git.mini-dweeb.org/?p=arnau/pcompmgr.git;a=summary
[1] http://git.mini-dweeb.org/?p=arnau/xcb-util.git;a=summary
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg