[RFC PATCH] damageproto: Explicitly document Damage lifetimes

Adam Jackson ajax at redhat.com
Thu Mar 29 09:02:28 PDT 2012


After an inquiry on IRC about Damage lifetimes, I remembered that I
hadn't followed up on this thread:

http://lists.x.org/archives/xorg-devel/2011-March/020920.html

All extant implementations of the DAMAGE extension have always deleted
Damage objects when their bound Drawable disappears.  This is awkward
against pixmaps, which don't have deletion events, but explicitly
documenting that it's awkward is better than no documentation at all.

One possibility would be to have a 1.2 version of the protocol that
simply doesn't generate BadDamage in any event; or, that tracks client
timestamps and suppresses BadDamage if the drawable has been destroyed
since the last Damage request; or, that generates DamageDestroyed events
as well.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 damageproto.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/damageproto.txt b/damageproto.txt
index 1f254d4..8007cda 100644
--- a/damageproto.txt
+++ b/damageproto.txt
@@ -88,7 +88,9 @@ the root window rather than the drawable.
 
 The "Damage" object holds any accumulated damage region and reflects the
 relationship between the drawable selected for damage notification and the
-drawable for which damage is tracked.
+drawable for which damage is tracked.  Damage objects have the same
+lifetime as their associated drawable, ie, they are implicitly destroyed
+when their drawable is destroyed.
 
 5. Errors
 
-- 
1.7.7.6



More information about the xorg-devel mailing list