summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-07-15 09:08:19 -0700
committerJamey Sharp <jamey@minilop.net>2011-12-14 18:39:26 -0800
commit21d05a82da92410996773c4c4f09ac0ebc15f97a (patch)
tree3f360548efef85ee9c1b4297fe3c8897318dbdbc
parentc65de901949a34f25075a3946756ef6db69000e4 (diff)
rootless: RootlessAlphaMask is configured the same way everywhere.
Notably, there's another copy of this macro in miexpose.c, and presumably they should always match. With this patch, rootless almost builds cleanly on Linux. Of course nothing uses it, but I like being able to at least compile-test as much xserver source as possible. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Cc: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--miext/rootless/README.txt17
-rw-r--r--miext/rootless/rootlessConfig.h7
-rw-r--r--miext/rootless/rootlessGC.c2
3 files changed, 6 insertions, 20 deletions
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index cea2c016a..3ae5ce56a 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -76,13 +76,6 @@ rootlessConfig.h to specify compile time options for its platform.
The following compile-time options are defined in
rootlessConfig.h:
- o RootlessAlphaMask(bpp): By default for a color bit depth of 24 and 32
- bits per pixel, fb will overwrite the "unused" 8 bits to optimize
- drawing speed. Rootless ensures that the alpha channel of frames is
- protected and is not modified when drawing to them. The bits
- containing the alpha channel are defined by this macro, which should
- return a bit mask for various bits per pixel.
-
o ROOTLESS_REDISPLAY_DELAY: Time in milliseconds between updates to
the underlying window server. Most operations will be buffered until
this time has expired.
@@ -129,12 +122,10 @@ Alpha Channel Protection
contents of the extra bits are undefined by the X11 protocol. Some window
systems will use these extra bits as an alpha channel. The generic rootless
layer will protect these bits and make sure they are not modified by other
-parts of the X server. To protect the alpha channel RootlessAlphaMask(bpp)
-must be set appropriately as described under the compile time options. This
-ensures that the X11 graphics primitives do not overwrite the alpha channel
-in an attempt to optimize drawing. In addition, the window functions
-PaintWindow() and Composite() must be replaced by alpha channel safe
-variants. These are provided in rootless/safeAlpha.
+parts of the X server. This ensures that the X11 graphics primitives do not
+overwrite the alpha channel in an attempt to optimize drawing. In addition,
+the window functions PaintWindow() and Composite() must be replaced by
+alpha channel safe variants. These are provided in rootless/safeAlpha.
Credits
diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h
index 222be53ac..8fb502dc6 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -40,11 +40,6 @@
# define ROOTLESS_RESIZE_GRAVITY TRUE
/*# define ROOTLESSDEBUG*/
-/* Bit mask for alpha channel with a particular number of bits per
- pixel. Note that we only care for 32bpp data. Mac OS X uses planar
- alpha for 16bpp. */
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
#endif /* __APPLE__ */
#if defined(__CYGWIN__) || defined(WIN32)
@@ -53,8 +48,6 @@
# undef ROOTLESS_RESIZE_GRAVITY
/*# define ROOTLESSDEBUG*/
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
#endif /* __CYGWIN__ */
#endif /* _ROOTLESSCONFIG_H */
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index a9cb41351..878e8471d 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -187,6 +187,8 @@ static GCOps rootlessGCOps = {
*/
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
#define GC_SAVE(pGC) \
unsigned long _save_fg = (pGC)->fgPixel; \
unsigned long _save_bg = (pGC)->bgPixel; \