diff options
-rw-r--r-- | AUTHORS | 0 | ||||
-rw-r--r-- | COPYING | 22 | ||||
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | INSTALL | 8 | ||||
-rw-r--r-- | Makefile.am | 37 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rw-r--r-- | README | 10 | ||||
-rwxr-xr-x | autogen.sh | 3 | ||||
-rw-r--r-- | configure.ac | 35 | ||||
-rw-r--r-- | damageext.pc.in | 9 | ||||
-rw-r--r-- | damageproto.h | 149 | ||||
-rw-r--r-- | damagewire.h | 57 | ||||
-rw-r--r-- | protocol | 72 |
13 files changed, 385 insertions, 31 deletions
@@ -0,0 +1,22 @@ +$Id: COPYING,v 1.1 2003-10-24 06:16:46 keithp Exp $ + +Copyright © 2001,2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + @@ -1,3 +1,17 @@ +2003-10-23 Keith Packard <keithp@keithp.com> + + * COPYING: + * INSTALL: + * Makefile.am: + * README: + * autogen.sh: + * configure.ac: + * damageext.pc.in: + * damageproto.h: + * damagewire.h: + * protocol: + Initial working version -- added DamageDestroy and damage objects + 2003-10-18 Keith Packard <keithp@keithp.com Initial protocol description added @@ -0,0 +1,8 @@ +Render is built with the traditional configure script: + + $ ./configure --prefix=/usr/X11R6 + +This should generate valid Makefiles, then: + + $ make + $ make install diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d4cd49b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +# +# $Id: Makefile.am,v 1.1 2003-10-24 06:16:46 keithp Exp $ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Keith Packard not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Keith Packard makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +damageextincludedir = $(includedir)/X11/extensions +damageextinclude_HEADERS = \ + damageproto.h \ + damagewire.h + + +damageextdocdir = $(datadir)/doc/damageext +damageextdoc_DATA = protocol + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = damageext.pc + +EXTRA_DIST = autogen.sh damageext.pc.in $(damageextdoc_DATA) + @@ -0,0 +1,10 @@ + RandR + X RandR Extension + Version 1.0 + 2002-10-4 + +This package contains header files and documentation for the X RandR +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..b1376df --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +#! /bin/sh +autoreconf -v --install || exit 1 +./configure --enable-maintainer-mode "$@" diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..2d7eb9d --- /dev/null +++ b/configure.ac @@ -0,0 +1,35 @@ +dnl +dnl $Id: configure.ac,v 1.1 2003-10-24 06:16:46 keithp Exp $ +dnl +dnl Copyright © 2003 Keith Packard, Noah Levitt +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.57]) +AC_INIT([damageext], [1.0], [keithp@keithp.com], damageext) +AM_INIT_AUTOMAKE([dist-bzip2]) +AM_MAINTAINER_MODE + +PKG_CHECK_MODULES(FIXESEXT, fixesext) + +AC_OUTPUT([Makefile + damageext.pc]) + diff --git a/damageext.pc.in b/damageext.pc.in new file mode 100644 index 0000000..079f039 --- /dev/null +++ b/damageext.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DamageExt +Description: X Damage extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} @FIXESEXT_CFLAGS@ diff --git a/damageproto.h b/damageproto.h new file mode 100644 index 0000000..feeb051 --- /dev/null +++ b/damageproto.h @@ -0,0 +1,149 @@ +/* + * $Id: damageproto.h,v 1.1 2003-10-24 06:16:46 keithp Exp $ + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _DAMAGEPROTO_H_ +#define _DAMAGEPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/xfixesproto.h> +#include <X11/extensions/damagewire.h> + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 +#define Region CARD32 +#define Damage CARD32 + +/************** Version 0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; +} xDamageReq; + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDamageQueryVersionReq; + +#define sz_xDamageQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDamageQueryVersionReply; + +#define sz_xDamageQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Drawable drawable B32; + CARD8 level; + CARD8 pad1; + CARD16 pad2 B16; +} xDamageCreateReq; + +#define sz_xDamageCreateReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; +} xDamageDestroyReq; + +#define sz_xDamageDestroyReq 8 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Region repair B32; + Region parts B32; +} xDamageSubtractReq; + +#define sz_xDamageSubtractReq 16 + +/* Events */ + +#define DamageNotifyMore 0x80 + +typedef struct { + CARD8 type; + CARD8 level; + CARD16 sequenceNumber B16; + Drawable drawable B32; + Damage damage B32; + Time timestamp B32; + xRectangle area; + xRectangle geometry; +} xDamageNotifyEvent; + +#undef Damage +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _DAMAGEPROTO_H_ */ diff --git a/damagewire.h b/damagewire.h new file mode 100644 index 0000000..c763420 --- /dev/null +++ b/damagewire.h @@ -0,0 +1,57 @@ +/* + * $Id: damagewire.h,v 1.1 2003-10-24 06:16:46 keithp Exp $ + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _DAMAGEWIRE_H_ +#define _DAMAGEWIRE_H_ + +#define DAMAGE_NAME "DAMAGE" +#define DAMAGE_MAJOR 1 +#define DAMAGE_MINOR 0 + +/************* Version 1 ****************/ + +/* Constants */ +#define XDamageReportRawRectangles 0 +#define XDamageReportDeltaRectangles 1 +#define XDamageReportBoundingBox 2 +#define XDamageReportNonEmpty 3 + +/* Requests */ +#define X_DamageQueryVersion 0 +#define X_DamageCreate 1 +#define X_DamageDestroy 2 +#define X_DamageSubtract 3 + +#define XDamageNumberRequests (X_DamageSubtract + 1) + +/* Events */ +#define XDamageNotify 0 + +#define XDamageNumberEvents (XDamageNotify + 1) + +/* Errors */ +#define BadDamage 0 +#define XDamageNumberErrors (BadDamage + 1) + +#endif /* _DAMAGEWIRE_H_ */ @@ -1,4 +1,4 @@ - The XDAMAGE Extension + The DAMAGE Extension Version 0.0 2003-10-18 Keith Packard @@ -8,7 +8,7 @@ Monitoring the regions affected by rendering has wide-spread use, from VNC-like systems scraping the screen to screen magnifying applications -designed to aid users with limited visual acuity. The XDAMAGE extension is +designed to aid users with limited visual acuity. The DAMAGE extension is designed to make such applications reasonably efficient in the face of server-client latency. @@ -44,7 +44,7 @@ object drawn (line, string, rectangle) to be represented as a single rectangle and for the damage area of the operation to be the union of these rectangles. -The XDAMAGE extension allows applications to either receive the raw +The DAMAGE extension allows applications to either receive the raw rectangles as a stream of events, or to have them partially processed within the X server to reduce the amount of data transmitted as well as reduce the processing latency once the repaint operation has started. @@ -52,7 +52,7 @@ processing latency once the repaint operation has started. Damage to a window reflects both drawing within the window itself as well as drawing within any inferior window that affects pixels seen by IncludeInferiors rendering operations. To reduce the computational -complexity of this, the XDAMAGE extension allows the server to monitor all +complexity of this, the DAMAGE extension allows the server to monitor all rendering operations within the physical target pixel storage that fall within the bounds of the window. In a system with a single frame buffer holding all windows, this means that damage will accumulate for all @@ -64,42 +64,46 @@ contents. 4. Data types -The XDAMAGE extension creates no new datatypes itself, but does lean heavily -on the XFIXES extension region datatypes. +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. 5. Errors -No new errors are included in the XDAMAGE extension. +Damage + A value for a DAMAGE argument does not name a defined DAMAGE. 6. Types + DAMAGE 32-bit value (top three bits guaranteed to be zero) + DamageReportLevel { DamageReportRawRectangles, DamageReportDeltaRectangles, DamageReportBoundingBox, DamageReportNonEmpty } - DamageReportRawRectangles + DamageReportRawRectangles Delivers DamageNotify events each time the screen is modified with rectangular bounds that circumscribe the damaged area. No attempt to compress out overlapping rectangles is made. - DamageReportDeltaRectangles + DamageReportDeltaRectangles Delivers DamageNotify events each time damage occurs which is not included in the damage region. The reported rectangles include only the changes to that area, not the raw damage data. - DamageReportBoundingBox + DamageReportBoundingBox Delivers DamageNotify events each time the bounding box enclosing the damage region increases in size. The reported rectangle encloses the entire damage region, not just the changes to that size. - DamageReportNonEmpty + DamageReportNonEmpty Delivers a single DamageNotify event each time the damage rectangle changes from empty to non-empty, and @@ -111,9 +115,15 @@ No new errors are included in the XDAMAGE extension. DamageNotify level: DamageReportLevel - window: Window + drawable: Drawable + damage: DAMAGE + more: Bool timestamp: Timestamp - damage: Rectangle + area: Rectangle + drawable-geometry: Rectangle + + 'more' indicates whether there are subsequent damage events + being delivered immediately as part of a larger damage region 8. Extension Initialization @@ -142,34 +152,34 @@ QueryVersion 9. Enable Monitoring -DamageMonitor +DamageCreate - window: Window + damage: DAMAGE + drawable: Drawable level: DamageReportLevel - damage_region: Region + + Creates a damage object to monitor changes to Drawable - The server establishes a damage monitor for window. 'region' - is used to hold the damage region when level is not - DamageReportRawRectangles, in which case it is ignored - and may be None. +DamageDestroy + damage: DAMAGE + + Destroys damage. DamageSubtract - window: window - damage_region: Region - repair_region: Region or None - parts_region: Region + damage: DAMAGE + repair: Region or None + parts: Region Synchronously modifies the regions in the following manner: - If repair_region is None: + If repair is None: - 1) parts_region = damage_region - 2) damage_region = <empty> + 1) parts = damage + 2) damage = <empty> Otherwise: - 1) parts_region = damage_region INTERSECT repair_region - 2) damage_region = damage_region - parts_region - - + 1) parts = damage INTERSECT repair + 2) damage = damage - parts + 3) Generate DamageNotify for remaining damage areas |