From: Jinkun Jang Date: Tue, 12 Mar 2013 16:54:37 +0000 (+0900) Subject: Tizen 2.1 base X-Git-Tag: accepted/tizen_2.1/20130425.024300 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac8f5ccff2c07e882a0e989dbe86c8768151774c;p=framework%2Fuifw%2Fxorg%2Fproto%2Fx11proto-damage.git Tizen 2.1 base --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..78b329f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Keith Packard, HP +Eric Anholt, Intel diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..a44e065 --- /dev/null +++ b/COPYING @@ -0,0 +1,23 @@ +$Id: COPYING,v 1.1 2003-10-24 06:16:46 keithp Exp $ + +Copyright © 2001,2003 Keith Packard +Copyright © 2007 Eric Anholt + +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. + diff --git a/ChangeLog b/ChangeLog new file mode 100755 index 0000000..a13f9ef --- /dev/null +++ b/ChangeLog @@ -0,0 +1,256 @@ +commit 7756ab88c9687bf8eeb7c1d423b2ad7a8d9c2aff +Author: Alan Coopersmith +Date: Fri Oct 29 20:34:38 2010 -0700 + + damageproto 1.2.1 + + Signed-off-by: Alan Coopersmith + +commit 3e4e9437e5a9d13a7accbf77ed498e327d51ac2e +Author: Gaetan Nadon +Date: Sun Mar 28 19:00:30 2010 -0400 + + config: remove the pkgconfig pc.in file from EXTRA_DIST + + Automake always includes it in the tarball. + remove autogen.sh which is not required in any GNU package + + Signed-off-by: Gaetan Nadon + +commit fe38c4d7b57d698de7bb8c4445b1c079386c8c7e +Author: Rémi Cardona +Date: Thu Dec 17 08:34:02 2009 +0100 + + Use $(docdir) for damageproto.txt install path + + Signed-off-by: Rémi Cardona + Reviewed-by: Gaetan Nadon + Reviewed-by: Alan Coopersmith + Reviewed-by: Dan Nicholson + +commit c11bd672411d513321c1997abf5428fc758e3bad +Author: Gaetan Nadon +Date: Sun Nov 22 19:24:47 2009 -0500 + + Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES + + Now that the INSTALL file is generated. + Allows running make maintainer-clean. + +commit da5f148ee88df8d67d7ff088965d7137cb4452c8 +Author: Gaetan Nadon +Date: Mon Nov 16 15:11:52 2009 -0500 + + Makefile.am: INSTALL file is missing or incorrect #24206 + + INSTALL file now copied from util-macros. + The copy in git is removed. + +commit 7cc105ddc97f6ec1386956431399e09414491292 +Author: Gaetan Nadon +Date: Mon Nov 16 15:09:23 2009 -0500 + + Revert "NEWS: remove empty file #24206" + + This reverts commit 2fa701f45f0aa12bbaeeb8adbb82389b09ec57a2. + The NEWS file was not empty + +commit 6198e1baa4e3223c8d77d925188797e18ec5ff0c +Author: Gaetan Nadon +Date: Mon Nov 16 11:10:10 2009 -0500 + + README: file created or updated #24206 + + Contains a set of URLs to freedesktop.org. + +commit 2fa701f45f0aa12bbaeeb8adbb82389b09ec57a2 +Author: Gaetan Nadon +Date: Sun Nov 15 20:28:15 2009 -0500 + + NEWS: remove empty file #24206 + +commit 537c02b4bd06f49120877710992f819a6558451a +Author: Gaetan Nadon +Date: Sun Nov 15 19:45:26 2009 -0500 + + Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432 + + ChangeLog filename is known to Automake and requires no further + coding in the makefile. + +commit e7efe628fd2227b2bebe5b1c0ba89e1830a09a77 +Author: Gaetan Nadon +Date: Sun Nov 15 18:31:28 2009 -0500 + + Makefile.am: INSTALL file is missing or incorrect #24206 + + The standard GNU file on building/installing tarball is copied + using the XORG_INSTALL macro contained in XORG_DEFAULT_OPTIONS + Add INSTALL target + +commit a3845453d5e6a049a8044c540a60288961ad2a9c +Author: Gaetan Nadon +Date: Sun Nov 15 18:11:36 2009 -0500 + + configure.ac: deploy the new XORG_DEFAULT_OPTIONS #24242 + + This macro aggregate a number of existing macros that sets commmon + X.Org components configuration options. It shields the configuration file from + future changes. + +commit ec1193509601c57a2da090463dcfb416432f6fa1 +Author: Gaetan Nadon +Date: Sat Nov 14 18:26:46 2009 -0500 + + .gitignore: use common defaults with custom section # 24239 + + Using common defaults will reduce errors and maintenance. + Only the very small or inexistent custom section need periodic maintenance + when the structure of the component changes. Do not edit defaults. + +commit 1950869c1640590b2ce7a96e2a97746b308093f8 +Author: Peter Hutterer +Date: Thu Aug 27 15:43:27 2009 +1000 + + damageproto 1.2.0 + +commit d25f083ba38d796e9a91de468fc8bec33545e400 +Author: Peter Hutterer +Date: Tue Aug 25 17:48:20 2009 +1000 + + Remove RCS tags + + Signed-off-by: Peter Hutterer + +commit 12b708a2fe5cb538c87239b35822ccc318f98b12 +Author: Gaetan Nadon +Date: Wed Jul 8 10:11:26 2009 -0400 + + damageproto: use XORG_CHANGELOG macro to create ChangeLog. #22611 + + Build break: Makefile.am: command not found: git-log + Adding the macro in configure.ac and use it in Makefile.am + Refer to: https://bugs.freedesktop.org/show_bug.cgi?id=22611 + Tested: running autogen.sh, make and 'make dist' + + Signed-off-by: Gaetan Nadon + Signed-off-by: Peter Hutterer + +commit c25bdf1cce48ad1b2bb33ba45969572e6e4d385f +Author: Owen Taylor +Date: Fri Sep 19 09:52:07 2008 -0400 + + Document that 'parts' may be None for DamageSubtract + + The server code has handled parts == None since at least 2004. + +commit ad1a35b351012a347c49246f986655e3a91431df +Author: James Cloos +Date: Thu Dec 6 16:38:57 2007 -0500 + + Replace static ChangeLog with dist-hook to generate from git log + +commit 63881a6b3f5571ba4c4b3614ea9346c733eb471b +Author: James Cloos +Date: Mon Sep 3 05:54:00 2007 -0400 + + Add *~ to .gitignore to skip patch/emacs droppings + +commit cff2b116eb2a6a7827b866910a84f8357c299be0 +Author: Eric Anholt +Date: Tue Jan 9 16:19:30 2007 -0800 + + Rename DamagePost to DamageAdd per suggestion from keithp. + +commit 97c47fc81f0dc152e1d32800ce5022d2d25c3c43 +Author: Eric Anholt +Date: Mon Jan 8 13:45:10 2007 -0800 + + Install the protocol doc as damageproto.txt in its canonical doc dir. + +commit 7a6e37818a6854ec4d74f80ce5053e04b7ae75ba +Author: Eric Anholt +Date: Mon Jan 8 13:41:20 2007 -0800 + + Documentation and copyright updates for 1.1 protocol (and other fixes). + +commit df33455a4506362eff4d393dc7d58c9d73ddf870 +Author: Eric Anholt +Date: Fri Jan 5 17:52:49 2007 -0800 + + Add a request to report a region of damage to a drawable. + + This bumps the protocol (and package) version to 1.1. + +commit 03e7a652b1674530e0d06ca8e2f869c0ba473f9f +Author: Keith Packard +Date: Fri Feb 24 02:15:53 2006 +0100 + + reflect filename change to .gitignore + +commit e6392f4199532cfd61195e45b784a252879e4750 +Author: Keith Packard +Date: Fri Feb 24 02:15:27 2006 +0100 + + Import changes from X.org repository + +commit 1a28d9a791ed918172286110e0dcffe458489b1a +Author: Keith Packard +Date: Fri Feb 24 02:09:04 2006 +0100 + + rename damageext.pc.in to damageproto.pc.in as per xorg + +commit 44c98d231588b6bdc1884ba7e6999b706238ecd7 +Author: Chris Larson +Date: Sun Jan 16 17:30:53 2005 +0000 + + Fix to work with automake 1.9.x. + +commit e86de666f5c9629cd98ed2b0460033da5d89a55b +Author: Daniel Stone +Date: Mon Jan 3 05:16:14 2005 +0000 + + New autogen.sh from Thomas Fitzsimmons that works with srcdir != objdir. + +commit 648b14e2d0c1222cbe7571443ba00bb777fee2d4 +Author: Jim Gettys +Date: Tue Feb 3 20:44:42 2004 +0000 + + add author to AUTHOR's file. + +commit 513adccc0f3db333c4b946e7173e0f286cc5b58e +Author: Daniel Stone +Date: Thu Jan 15 03:40:44 2004 +0000 + + Tag release 1.0 for first freedesktop.org clientside lib release. + +commit d3ba8ef49c46fc691458ae319b80a85ccc25c121 +Author: Chris Lee +Date: Wed Nov 26 03:47:58 2003 +0000 + + Fixes to make these work on Debian's libtool (which seems to still be buggy). + -clee + +commit b5f3d0fe86af6e077cda237fcb1b2f34ab9c1eea +Author: Keith Packard +Date: Tue Nov 4 03:30:32 2003 +0000 + + Mark document revision Credit Havoc the Tolerant for his earlier design and implementation + +commit 4abd06d76008abede31086fccb7c0136732241a9 +Author: Keith Packard +Date: Fri Oct 24 06:39:35 2003 +0000 + + Add .cvsignore + +commit a4b351053662f4db4a165117cb18555dc4fabd33 +Author: Keith Packard +Date: Fri Oct 24 06:16:46 2003 +0000 + + Initial working version -- added DamageDestroy and damage objects + +commit 1b3ffaa1a673418fab22383bf509040924d177d3 +Author: Keith Packard +Date: Sun Oct 19 04:55:31 2003 +0000 + + Initial revision diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..8b82ade --- /dev/null +++ b/INSTALL @@ -0,0 +1,291 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008 Free Software Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *Note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100755 index 0000000..7c9b757 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,43 @@ +# +# 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. + +damagedir = $(includedir)/X11/extensions +damage_HEADERS = \ + damageproto.h \ + damagewire.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = damageproto.pc + +dist_doc_DATA = damageproto.txt + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..29b8edd --- /dev/null +++ b/NEWS @@ -0,0 +1,2 @@ +2004-01-05: Version 1.0 released. +2007-01-09: Version 1.1 released, adding the DamageAdd request. \ No newline at end of file diff --git a/README b/README new file mode 100755 index 0000000..a8a4e78 --- /dev/null +++ b/README @@ -0,0 +1,34 @@ + Damage + X Damage Extension + Version 1.1 + 2007-01-08 + +This package contains header files and documentation for the X Damage +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/damageproto + + http://cgit.freedesktop.org/xorg/proto/damageproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/configure.ac b/configure.ac new file mode 100755 index 0000000..60c8780 --- /dev/null +++ b/configure.ac @@ -0,0 +1,38 @@ +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.60]) +AC_INIT([DamageProto], [1.2.1], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + damageproto.pc]) + diff --git a/damageproto.h b/damageproto.h new file mode 100644 index 0000000..107e192 --- /dev/null +++ b/damageproto.h @@ -0,0 +1,158 @@ +/* + * Copyright © 2003 Keith Packard + * Copyright © 2007 Eric Anholt + * + * 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 +#include +#include + +#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 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Drawable drawable B32; + Region region B32; +} xDamageAddReq; + +#define sz_xDamageAddReq 12 + +/* 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/damageproto.pc.in b/damageproto.pc.in new file mode 100644 index 0000000..25476b9 --- /dev/null +++ b/damageproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DamageProto +Description: Damage extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/damageproto.txt b/damageproto.txt new file mode 100644 index 0000000..1f254d4 --- /dev/null +++ b/damageproto.txt @@ -0,0 +1,222 @@ + The DAMAGE Extension + Protocol Version 1.1 + Document Revision 1 + 2007-01-08 + + Keith Packard + keithp@keithp.com + + Eric Anholt + eric@anholt.net + Open Source Technology Center + Intel Corporation +1. Introduction + +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 DAMAGE extension is +designed to make such applications reasonably efficient in the face of +server-client latency. + +2. Acknolwedgements + +As usual, the author had significant input from many people, in particular: + + + Havoc Pennington who designed and implemented a Damage extension + last year which was then lost to the mists of time. + + + Bill Haneman whose work on accessibility in the Gnome environment + is legendary. + + + Jim Gettys who found a way to avoid streaming damage rectangles + to the client in many cases. + + + Owen Taylor who suggested that streaming damage rectangles may + be warranted in some cases after all. + +3. Damage Model + +We call changes made to pixel contents of windows and pixmaps 'damage' +throughout this extension. Another notion of 'damage' are drawable regions +which are in need of redisplay to repair the effects of window manipulation +or other data loss. This extension doesn't deal with this second notion at +all; suggestions on a better term which isn't easily conflated with existing +notions are eagerly solicited. + +Damage accumulates as drawing occurs in the drawable. Each drawing operation +'damages' one or more rectangular areas within the drawable. The rectangles +are guaranteed to include the set of pixels modified by each operation, but +may include significantly more than just those pixels. The desire is for +the damage to strike a balance between the number of rectangles reported and +the extraneous area included. A reasonable goal is for each primitive +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 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. + +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 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 +rendering operations that lie within the visible part of the window. + +The precise reason for this architecture is to enable the Composite +extension which provides multiple pixel storage areas for the screen +contents. + +3.1 Additions in the 1.1 version of the protocol + +Damage is automatically computed by the X Server for X rendering operations, +but direct rendering extensions have allowed clients to perform rendering +outside of the control of the X Server. The 1.1 version of the protocol +added a request to allow direct rendering clients to report damage to a +drawable. Some direct rendering clients, due to architectural limitations, +always perform rendering to the root window, even in when it should be +performed to the backing pixmap in the Composite case. To provide +less-incorrect rendering in this cases, the direct rendering client should +translate its damage region to screen coordinates and report the damage against +the root window rather than the drawable. + +4. Data types + +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 + +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 + + 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 + + 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 + + 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 + + Delivers a single DamageNotify event each time the + damage rectangle changes from empty to non-empty, and + also whenever the result of a DamageSubtract request + results in a non-empty region. + +7. Events + +DamageNotify + + level: DamageReportLevel + drawable: Drawable + damage: DAMAGE + more: Bool + timestamp: Timestamp + 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 + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + +QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the clients responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +9. Enable Monitoring + +DamageCreate + + damage: DAMAGE + drawable: Drawable + level: DamageReportLevel + + Creates a damage object to monitor changes to Drawable + +DamageDestroy + damage: DAMAGE + + Destroys damage. + +DamageSubtract + + damage: DAMAGE + repair: Region or None + parts: Region or None + + Synchronously modifies the regions in the following manner: + + If repair is None: + + 1) if parts is not None, parts = damage + 2) damage = + + Otherwise: + + 1) tmp = damage INTERSECT repair + 2) damage = damage - tmp + 3) if parts is not None, parts = tmp + 4) Generate DamageNotify for remaining damage areas + +DamageAdd + + drawable: Drawable + region: Region + + Reports damage of the region within the given drawable. This may be + used by direct rendering clients to report damage that the server would + otherwise be unaware of. The damage region is relative to the origin + of the drawable. + + Damage posted in this way will appear in DamageNotify events as normal, + and also in server internal damage tracking (for shadow framebuffer + updates, pixmap damage, and other uses). diff --git a/damagewire.h b/damagewire.h new file mode 100644 index 0000000..d90a0dd --- /dev/null +++ b/damagewire.h @@ -0,0 +1,56 @@ +/* + * 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 1 + +/************* 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 X_DamageAdd 4 + +#define XDamageNumberRequests (X_DamageAdd + 1) + +/* Events */ +#define XDamageNotify 0 + +#define XDamageNumberEvents (XDamageNotify + 1) + +/* Errors */ +#define BadDamage 0 +#define XDamageNumberErrors (BadDamage + 1) + +#endif /* _DAMAGEWIRE_H_ */ diff --git a/packaging/xorg-x11-proto-damage.spec b/packaging/xorg-x11-proto-damage.spec new file mode 100644 index 0000000..3ca2de2 --- /dev/null +++ b/packaging/xorg-x11-proto-damage.spec @@ -0,0 +1,46 @@ +Name: xorg-x11-proto-damage +Summary: X.Org X11 Protocol damageproto +Version: 1.2.1 +Release: 2 +Group: Development/System +License: MIT +URL: http://www.x.org +Source0: %{name}-%{version}.tar.gz +Provides: damageproto + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(xorg-macros) + +# some file to be intalled can be ignored when rpm generates packages +%define _unpackaged_files_terminate_build 0 + +%description +Description: %{summary} + +%prep +%setup -q + +%build + +./autogen.sh +%reconfigure --disable-static \ + --libdir=%{_datadir} \ + --without-xmlto + +# Call make instruction with smp support +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +%remove_docs + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_includedir}/X11/extensions/*.h +%{_datadir}/pkgconfig/*.pc +