aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/miext/rootless
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-14 13:17:20 +0000
committermarha <marha@users.sourceforge.net>2010-09-14 13:17:20 +0000
commit3815190d52f8ae453c2458335394eb5b18ab9bf5 (patch)
treef1d30ef6d20654c2b6e201dec66426f99465bea2 /xorg-server/miext/rootless
parent9e19f3933a9c37ea36ce295b6434bbd326fe44ad (diff)
downloadvcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.tar.gz
vcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.tar.bz2
vcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.zip
xserver libX11 pixman git update 14/9/2010
Diffstat (limited to 'xorg-server/miext/rootless')
-rw-r--r--xorg-server/miext/rootless/README.txt733
-rw-r--r--xorg-server/miext/rootless/rootless.h90
-rw-r--r--xorg-server/miext/rootless/rootlessCommon.c39
-rw-r--r--xorg-server/miext/rootless/rootlessConfig.h128
-rw-r--r--xorg-server/miext/rootless/rootlessGC.c57
-rw-r--r--xorg-server/miext/rootless/rootlessWindow.c23
6 files changed, 410 insertions, 660 deletions
diff --git a/xorg-server/miext/rootless/README.txt b/xorg-server/miext/rootless/README.txt
index 2c3fbb05a..1beabda38 100644
--- a/xorg-server/miext/rootless/README.txt
+++ b/xorg-server/miext/rootless/README.txt
@@ -1,399 +1,334 @@
- Generic Rootless Layer
- Version 1.0
- July 13, 2004
-
- Torrey T. Lyons
- torrey@xfree86.org
-
-
-Introduction
-
- The generic rootless layer allows an X server to be implemented
-on top of another window server in a cooperative manner. This allows the
-X11 windows and native windows of the underlying window server to
-coexist on the same screen. The layer is called "rootless" because the root
-window of the X server is generally not drawn. Instead, each top-level
-child of the root window is represented as a separate on-screen window by
-the underlying window server. The layer is referred to as "generic"
-because it abstracts away the details of the underlying window system and
-contains code that is useful for any rootless X server. The code for the
-generic rootless layer is located in xc/programs/Xserver/miext/rootless. To
-build a complete rootless X server requires a specific rootless
-implementation, which provides functions that allow the generic rootless
-layer to interact with the underlying window system.
-
-
-Concepts
-
- In the context of a rootless X server the term window is used to
-mean many fundamentally different things. For X11 a window is a DDX
-resource that describes a visible, or potentially visible, rectangle on the
-screen. A top-level window is a direct child of the root window. To avoid
-confusion, an on-screen native window of the underlying window system
-is referred to as a "frame". The generic rootless layer associates each
-mapped top-level X11 window with a frame. An X11 window may be said
-to be "framed" if it or its top-level parent is represented by a frame.
-
- The generic rootless layer models each frame as being backed at
-all times by a backing buffer, which is periodically flushed to the screen.
-If the underlying window system does not provide a backing buffer for
-frames, this must be done by the rootless implementation. The generic
-rootless layer model does not assume it always has access to the frames'
-backing buffers. Any drawing to the buffer will be proceeded by a call to
-the rootless implementation's StartDrawing() function and StopDrawing()
-will be called when the drawing is concluded. The address of the frame's
-backing buffer is returned by the StartDrawing() function and it can
-change between successive calls.
-
- Because each frame is assumed to have a backing buffer, the
-generic rootless layer will stop Expose events being generated when the
-regions of visibility of a frame change on screen. This is similar to backing
-store, but backing buffers are different in that they always store a copy of
-the entire window contents, not just the obscured portions. The price paid
-in increased memory consumption is made up by the greatly decreased
-complexity in not having to track and record regions as they are obscured.
-
-
-Rootless Implementation
-
- The specifics of the underlying window system are provided to the
-generic rootless layer through rootless implementation functions, compile-
-time options, and runtime parameters. The rootless implementation
-functions are a list of functions that allow the generic rootless layer to
-perform operations such as creating, destroying, moving, and resizing
-frames. Some of the implementation functions are optional. A detailed
-description of the rootless implementation functions is provided in
-Appendix A.
-
- By design, a rootless implementation should only have to include
-the rootless.h header file. The rootlessCommon.h file contains definitions
-internal to the generic rootless layer. (If you find you need to use
-rootlessCommon.h in your implementation, let the generic rootless layer
-maintainers know. This could be an area where the generic rootless layer
-should be generalized.) A rootless implementation should also modify
-rootlessConfig.h to specify compile time options for its platform.
-
- The following compile-time options are defined in
-rootlessConfig.h:
-
- o ROOTLESS_GLOBAL_COORDS: This option controls the way that frame
- coordinates are passed to the rootless implementation. If false,
- the coordinates are passed per screen relative to the origin of
- the screen the frame is currently on. Some implementations may
- prefer to work in a single global coordinate space that spans all
- screens. If this option is true, the coordinates are passed after
- adding the coordinates of the screen origin and an overall offset of
- (rootlessGlobalOffsetX, rootlessGlobalOffsetY).
-
- o ROOTLESS_PROTECT_ALPHA: 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. If this is true, the alpha channel of frames is
- protected and is not modified when drawing to them. The bits
- containing the alpha channel are defined by the macro
- RootlessAlphaMask(bpp), 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.
-
- o ROOTLESS_RESIZE_GRAVITY: If the underlying window system supports it,
- some frame resizes can be optimized by relying on the frame contents
- maintaining a particular gravity during the resize. In this way less
- of the frame contents need to be preserved by the generic rootless
- layer. If true, the generic rootless layer will pass gravity hints
- during resizing and rely on the frame contents being preserved
- accordingly.
-
- o ROOTLESS_TRACK_DAMAGE: The generic rootless layer draws to the
- frames' backing buffers and periodically flushes the modified
- regions to the underlying window server. If this option is true,
- the generic rootless layer will track these damaged regions.
- Currently it uses the miRegion code and will not simplify damaged
- regions even when updating a bounding region would be more
- efficient. Some window systems provide a more efficient way to
- track damaged regions. If this option is false, the rootless
- implementation function DamageRects() is called whenever a
- backing buffer is modified and the rootless implementation is
- expected to track the damaged regions itself.
-
- The following runtime options are defined in rootless.h:
-
- o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
- used if ROOTLESS_GLOBAL_COORDS is true. They specify the global
- offset that is applied to all screens when converting from
- screen-local to global coordinates.
-
- o rootless_CopyBytes_threshold, rootless_FillBytes_threshold,
- rootless_CompositePixels_threshold, rootless_CopyWindow_threshold:
- The minimum number of bytes or pixels for which to use the rootless
- implementation's respective acceleration function. The rootless
- acceleration functions are all optional so these will only be used
- if the respective acceleration function pointer is not NULL.
-
-
-Accelerated Drawing
-
- The rootless implementation typically does not have direct access
-to the hardware. Its access to the graphics hardware is generally through
-the API of the underlying window system. This underlying API may not
-overlap well with the X11 drawing primitives. The generic rootless layer
-falls back to using fb for all its 2-D drawing. Providing optional rootless
-implementation acceleration functions can accelerate some graphics
-primitives and some window functions. Typically calling through to the
-underlying window systems API will not speed up these operations for
-small enough areas. The rootless_*_threshold runtime options allow the
-rootless implementation to provide hints for when the acceleration
-functions should be used instead of fb.
-
-
-Alpha Channel Protection
-
- If the bits per pixel is greater then the color bit depth, the 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 can
-be configured to protect these bits and make sure they are not modified by
-other parts of the X server. To protect the alpha channel
-ROOTLESS_PROTECT_ALPHA and 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.
-
-
-Credits
-
- The generic rootless layer was originally conceived and developed
-by Greg Parker as part of the XDarwin X server on Mac OS X. John
-Harper made later optimizations to this code but removed its generic
-independence of the underlying window system. Torrey T. Lyons
-reintroduced the generic abstractions and made the rootless code suitable
-for use by other X servers.
-
-
-Appendix A: Rootless Implementation Functions
-
- The rootless implementation functions are defined in rootless.h. It
-is intended that rootless.h contains the complete interface that is needed by
-rootless implementations. The definitions contained in rootlessCommon.h
-are intended for internal use by the generic rootless layer and are more
-likely to change.
-
- Most of these functions take a RootlessFrameID as a parameter.
-The RootlessFrameID is an opaque object that is returned by the
-implementation's CreateFrame() function. The generic rootless layer does
-not use this frame id other than to pass it back to the rootless
-implementation to indicate the frame to operate on.
-
-/*
- * Create a new frame.
- * The frame is created unmapped.
- *
- * pFrame RootlessWindowPtr for this frame should be completely
- * initialized before calling except for pFrame->wid, which
- * is set by this function.
- * pScreen Screen on which to place the new frame
- * newX, newY Position of the frame. These will be identical to pFrame-x,
- * pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
- * pNewShape Shape for the frame (in frame-local coordinates). NULL for
- * unshaped frames.
- */
-typedef Bool (*RootlessCreateFrameProc)
- (RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY,
- RegionPtr pNewShape);
-
-/*
- * Destroy a frame.
- * Drawing is stopped and all updates are flushed before this is called.
- *
- * wid Frame id
- */
-typedef void (*RootlessDestroyFrameProc)
- (RootlessFrameID wid);
-
-/*
- * Move a frame on screen.
- * Drawing is stopped and all updates are flushed before this is called.
- *
- * wid Frame id
- * pScreen Screen to move the new frame to
- * newX, newY New position of the frame
- */
-typedef void (*RootlessMoveFrameProc)
- (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
-
-/*
- * Resize and move a frame.
- * Drawing is stopped and all updates are flushed before this is called.
- *
- * wid Frame id
- * pScreen Screen to move the new frame to
- * newX, newY New position of the frame
- * newW, newH New size of the frame
- * gravity Gravity for window contents (rl_gravity_enum). This is always
- * RL_GRAVITY_NONE unless ROOTLESS_RESIZE_GRAVITY is set.
- */
-typedef void (*RootlessResizeFrameProc)
- (RootlessFrameID wid, ScreenPtr pScreen,
- int newX, int newY, unsigned int newW, unsigned int newH,
- unsigned int gravity);
-
-/*
- * Change frame ordering (AKA stacking, layering).
- * Drawing is stopped before this is called. Unmapped frames are mapped by
- * setting their ordering.
- *
- * wid Frame id
- * nextWid Frame id of frame that is now above this one or NULL if this
- * frame is at the top.
- */
-typedef void (*RootlessRestackFrameProc)
- (RootlessFrameID wid, RootlessFrameID nextWid);
-
-/*
- * Change frame's shape.
- * Drawing is stopped before this is called.
- *
- * wid Frame id
- * pNewShape New shape for the frame (in frame-local coordinates)
- * or NULL if now unshaped.
- */
-typedef void (*RootlessReshapeFrameProc)
- (RootlessFrameID wid, RegionPtr pNewShape);
-
-/*
- * Unmap a frame.
- *
- * wid Frame id
- */
-typedef void (*RootlessUnmapFrameProc)
- (RootlessFrameID wid);
-
-/*
- * Start drawing to a frame.
- * Prepare a frame for direct access to its backing buffer.
- *
- * wid Frame id
- * pixelData Address of the backing buffer (returned)
- * bytesPerRow Width in bytes of the backing buffer (returned)
- */
-typedef void (*RootlessStartDrawingProc)
- (RootlessFrameID wid, char **pixelData, int *bytesPerRow);
-
-/*
- * Stop drawing to a frame.
- * No drawing to the frame's backing buffer will occur until drawing
- * is started again.
- *
- * wid Frame id
- * flush Flush drawing updates for this frame to the screen. This
- * will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
- */
-typedef void (*RootlessStopDrawingProc)
- (RootlessFrameID wid, Bool flush);
-
-/*
- * Flush drawing updates to the screen.
- * Drawing is stopped before this is called.
- *
- * wid Frame id
- * pDamage Region containing all the changed pixels in frame-local
- * coordinates. This is clipped to the window's clip. This
- * will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
- */
-typedef void (*RootlessUpdateRegionProc)
- (RootlessFrameID wid, RegionPtr pDamage);
-
-/*
- * Mark damaged rectangles as requiring redisplay to screen.
- * This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
- *
- * wid Frame id
- * nrects Number of damaged rectangles
- * rects Array of damaged rectangles in frame-local coordinates
- * shift_x, Vector to shift rectangles by
- * shift_y
- */
-typedef void (*RootlessDamageRectsProc)
- (RootlessFrameID wid, int nrects, const BoxRec *rects,
- int shift_x, int shift_y);
-
-/*
- * Switch the window associated with a frame. (Optional)
- * When a framed window is reparented, the frame is resized and set to
- * use the new top-level parent. If defined this function will be called
- * afterwards for implementation specific bookkeeping.
- *
- * pFrame Frame whose window has switched
- * oldWin Previous window wrapped by this frame
- */
-typedef void (*RootlessSwitchWindowProc)
- (RootlessWindowPtr pFrame, WindowPtr oldWin);
-
-/*
- * Copy bytes. (Optional)
- * Source and destinate may overlap and the right thing should happen.
- *
- * width Bytes to copy per row
- * height Number of rows
- * src Source data
- * srcRowBytes Width of source in bytes
- * dst Destination data
- * dstRowBytes Width of destination in bytes
- */
-typedef void (*RootlessCopyBytesProc)
- (unsigned int width, unsigned int height,
- const void *src, unsigned int srcRowBytes,
- void *dst, unsigned int dstRowBytes);
-
-/*
- * Fill memory with 32-bit pattern. (Optional)
- *
- * width Bytes to fill per row
- * height Number of rows
- * value 32-bit pattern to fill with
- * dst Destination data
- * dstRowBytes Width of destination in bytes
- */
-typedef void (*RootlessFillBytesProc)
- (unsigned int width, unsigned int height, unsigned int value,
- void *dst, unsigned int dstRowBytes);
-
-/*
- * Composite pixels from source and mask to destination. (Optional)
- *
- * width, height Size of area to composite to in pizels
- * function Composite function built with RL_COMPOSITE_FUNCTION
- * src Source data
- * srcRowBytes Width of source in bytes (Passing NULL means source
- * is a single pixel.
- * mask Mask data
- * maskRowBytes Width of mask in bytes
- * dst Destination data
- * dstRowBytes Width of destination in bytes
- *
- * For src and dst, the first element of the array is the color data. If
- * the second element is non-null it implies there is alpha data (which
- * may be meshed or planar). Data without alpha is assumed to be opaque.
- *
- * An X11 error code is returned.
- */
-typedef int (*RootlessCompositePixelsProc)
- (unsigned int width, unsigned int height, unsigned int function,
- void *src[2], unsigned int srcRowBytes[2],
- void *mask, unsigned int maskRowBytes,
- void *dst[2], unsigned int dstRowBytes[2]);
-
-/*
- * Copy area in frame to another part of frame. (Optional)
- *
- * wid Frame id
- * dstNrects Number of rectangles to copy
- * dstRects Array of rectangles to copy
- * dx, dy Number of pixels away to copy area
- */
-typedef void (*RootlessCopyWindowProc)
- (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
- int dx, int dy);
-
+ Generic Rootless Layer
+ Version 1.0
+ July 13, 2004
+
+ Torrey T. Lyons
+ torrey@xfree86.org
+
+
+Introduction
+
+ The generic rootless layer allows an X server to be implemented
+on top of another window server in a cooperative manner. This allows the
+X11 windows and native windows of the underlying window server to
+coexist on the same screen. The layer is called "rootless" because the root
+window of the X server is generally not drawn. Instead, each top-level
+child of the root window is represented as a separate on-screen window by
+the underlying window server. The layer is referred to as "generic"
+because it abstracts away the details of the underlying window system and
+contains code that is useful for any rootless X server. The code for the
+generic rootless layer is located in xc/programs/Xserver/miext/rootless. To
+build a complete rootless X server requires a specific rootless
+implementation, which provides functions that allow the generic rootless
+layer to interact with the underlying window system.
+
+
+Concepts
+
+ In the context of a rootless X server the term window is used to
+mean many fundamentally different things. For X11 a window is a DDX
+resource that describes a visible, or potentially visible, rectangle on the
+screen. A top-level window is a direct child of the root window. To avoid
+confusion, an on-screen native window of the underlying window system
+is referred to as a "frame". The generic rootless layer associates each
+mapped top-level X11 window with a frame. An X11 window may be said
+to be "framed" if it or its top-level parent is represented by a frame.
+
+ The generic rootless layer models each frame as being backed at
+all times by a backing buffer, which is periodically flushed to the screen.
+If the underlying window system does not provide a backing buffer for
+frames, this must be done by the rootless implementation. The generic
+rootless layer model does not assume it always has access to the frames'
+backing buffers. Any drawing to the buffer will be proceeded by a call to
+the rootless implementation's StartDrawing() function and StopDrawing()
+will be called when the drawing is concluded. The address of the frame's
+backing buffer is returned by the StartDrawing() function and it can
+change between successive calls.
+
+ Because each frame is assumed to have a backing buffer, the
+generic rootless layer will stop Expose events being generated when the
+regions of visibility of a frame change on screen. This is similar to backing
+store, but backing buffers are different in that they always store a copy of
+the entire window contents, not just the obscured portions. The price paid
+in increased memory consumption is made up by the greatly decreased
+complexity in not having to track and record regions as they are obscured.
+
+
+Rootless Implementation
+
+ The specifics of the underlying window system are provided to the
+generic rootless layer through rootless implementation functions, compile-
+time options, and runtime parameters. The rootless implementation
+functions are a list of functions that allow the generic rootless layer to
+perform operations such as creating, destroying, moving, and resizing
+frames. Some of the implementation functions are optional. A detailed
+description of the rootless implementation functions is provided in
+Appendix A.
+
+ By design, a rootless implementation should only have to include
+the rootless.h header file. The rootlessCommon.h file contains definitions
+internal to the generic rootless layer. (If you find you need to use
+rootlessCommon.h in your implementation, let the generic rootless layer
+maintainers know. This could be an area where the generic rootless layer
+should be generalized.) A rootless implementation should also modify
+rootlessConfig.h to specify compile time options for its platform.
+
+ The following compile-time options are defined in
+rootlessConfig.h:
+
+ o ROOTLESS_PROTECT_ALPHA: 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. If this is true, the alpha channel of frames is
+ protected and is not modified when drawing to them. The bits
+ containing the alpha channel are defined by the macro
+ RootlessAlphaMask(bpp), 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.
+
+ o ROOTLESS_RESIZE_GRAVITY: If the underlying window system supports it,
+ some frame resizes can be optimized by relying on the frame contents
+ maintaining a particular gravity during the resize. In this way less
+ of the frame contents need to be preserved by the generic rootless
+ layer. If true, the generic rootless layer will pass gravity hints
+ during resizing and rely on the frame contents being preserved
+ accordingly.
+
+ The following runtime options are defined in rootless.h:
+
+ o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify the global
+ offset that is applied to all screens when converting from
+ screen-local to global coordinates.
+
+ o rootless_CopyBytes_threshold, rootless_CopyWindow_threshold:
+ The minimum number of bytes or pixels for which to use the rootless
+ implementation's respective acceleration function. The rootless
+ acceleration functions are all optional so these will only be used
+ if the respective acceleration function pointer is not NULL.
+
+
+Accelerated Drawing
+
+ The rootless implementation typically does not have direct access
+to the hardware. Its access to the graphics hardware is generally through
+the API of the underlying window system. This underlying API may not
+overlap well with the X11 drawing primitives. The generic rootless layer
+falls back to using fb for all its 2-D drawing. Providing optional rootless
+implementation acceleration functions can accelerate some graphics
+primitives and some window functions. Typically calling through to the
+underlying window systems API will not speed up these operations for
+small enough areas. The rootless_*_threshold runtime options allow the
+rootless implementation to provide hints for when the acceleration
+functions should be used instead of fb.
+
+
+Alpha Channel Protection
+
+ If the bits per pixel is greater then the color bit depth, the 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 can
+be configured to protect these bits and make sure they are not modified by
+other parts of the X server. To protect the alpha channel
+ROOTLESS_PROTECT_ALPHA and 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.
+
+
+Credits
+
+ The generic rootless layer was originally conceived and developed
+by Greg Parker as part of the XDarwin X server on Mac OS X. John
+Harper made later optimizations to this code but removed its generic
+independence of the underlying window system. Torrey T. Lyons
+reintroduced the generic abstractions and made the rootless code suitable
+for use by other X servers.
+
+
+Appendix A: Rootless Implementation Functions
+
+ The rootless implementation functions are defined in rootless.h. It
+is intended that rootless.h contains the complete interface that is needed by
+rootless implementations. The definitions contained in rootlessCommon.h
+are intended for internal use by the generic rootless layer and are more
+likely to change.
+
+ Most of these functions take a RootlessFrameID as a parameter.
+The RootlessFrameID is an opaque object that is returned by the
+implementation's CreateFrame() function. The generic rootless layer does
+not use this frame id other than to pass it back to the rootless
+implementation to indicate the frame to operate on.
+
+/*
+ * Create a new frame.
+ * The frame is created unmapped.
+ *
+ * pFrame RootlessWindowPtr for this frame should be completely
+ * initialized before calling except for pFrame->wid, which
+ * is set by this function.
+ * pScreen Screen on which to place the new frame
+ * newX, newY Position of the frame.
+ * pNewShape Shape for the frame (in frame-local coordinates). NULL for
+ * unshaped frames.
+ */
+typedef Bool (*RootlessCreateFrameProc)
+ (RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY,
+ RegionPtr pNewShape);
+
+/*
+ * Destroy a frame.
+ * Drawing is stopped and all updates are flushed before this is called.
+ *
+ * wid Frame id
+ */
+typedef void (*RootlessDestroyFrameProc)
+ (RootlessFrameID wid);
+
+/*
+ * Move a frame on screen.
+ * Drawing is stopped and all updates are flushed before this is called.
+ *
+ * wid Frame id
+ * pScreen Screen to move the new frame to
+ * newX, newY New position of the frame
+ */
+typedef void (*RootlessMoveFrameProc)
+ (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY);
+
+/*
+ * Resize and move a frame.
+ * Drawing is stopped and all updates are flushed before this is called.
+ *
+ * wid Frame id
+ * pScreen Screen to move the new frame to
+ * newX, newY New position of the frame
+ * newW, newH New size of the frame
+ * gravity Gravity for window contents (rl_gravity_enum). This is always
+ * RL_GRAVITY_NONE unless ROOTLESS_RESIZE_GRAVITY is set.
+ */
+typedef void (*RootlessResizeFrameProc)
+ (RootlessFrameID wid, ScreenPtr pScreen,
+ int newX, int newY, unsigned int newW, unsigned int newH,
+ unsigned int gravity);
+
+/*
+ * Change frame ordering (AKA stacking, layering).
+ * Drawing is stopped before this is called. Unmapped frames are mapped by
+ * setting their ordering.
+ *
+ * wid Frame id
+ * nextWid Frame id of frame that is now above this one or NULL if this
+ * frame is at the top.
+ */
+typedef void (*RootlessRestackFrameProc)
+ (RootlessFrameID wid, RootlessFrameID nextWid);
+
+/*
+ * Change frame's shape.
+ * Drawing is stopped before this is called.
+ *
+ * wid Frame id
+ * pNewShape New shape for the frame (in frame-local coordinates)
+ * or NULL if now unshaped.
+ */
+typedef void (*RootlessReshapeFrameProc)
+ (RootlessFrameID wid, RegionPtr pNewShape);
+
+/*
+ * Unmap a frame.
+ *
+ * wid Frame id
+ */
+typedef void (*RootlessUnmapFrameProc)
+ (RootlessFrameID wid);
+
+/*
+ * Start drawing to a frame.
+ * Prepare a frame for direct access to its backing buffer.
+ *
+ * wid Frame id
+ * pixelData Address of the backing buffer (returned)
+ * bytesPerRow Width in bytes of the backing buffer (returned)
+ */
+typedef void (*RootlessStartDrawingProc)
+ (RootlessFrameID wid, char **pixelData, int *bytesPerRow);
+
+/*
+ * Stop drawing to a frame.
+ * No drawing to the frame's backing buffer will occur until drawing
+ * is started again.
+ *
+ * wid Frame id
+ * flush Flush drawing updates for this frame to the screen.
+ */
+typedef void (*RootlessStopDrawingProc)
+ (RootlessFrameID wid, Bool flush);
+
+/*
+ * Flush drawing updates to the screen.
+ * Drawing is stopped before this is called.
+ *
+ * wid Frame id
+ * pDamage Region containing all the changed pixels in frame-local
+ * coordinates. This is clipped to the window's clip.
+ */
+typedef void (*RootlessUpdateRegionProc)
+ (RootlessFrameID wid, RegionPtr pDamage);
+
+/*
+ * Mark damaged rectangles as requiring redisplay to screen.
+ *
+ * wid Frame id
+ * nrects Number of damaged rectangles
+ * rects Array of damaged rectangles in frame-local coordinates
+ * shift_x, Vector to shift rectangles by
+ * shift_y
+ */
+typedef void (*RootlessDamageRectsProc)
+ (RootlessFrameID wid, int nrects, const BoxRec *rects,
+ int shift_x, int shift_y);
+
+/*
+ * Switch the window associated with a frame. (Optional)
+ * When a framed window is reparented, the frame is resized and set to
+ * use the new top-level parent. If defined this function will be called
+ * afterwards for implementation specific bookkeeping.
+ *
+ * pFrame Frame whose window has switched
+ * oldWin Previous window wrapped by this frame
+ */
+typedef void (*RootlessSwitchWindowProc)
+ (RootlessWindowPtr pFrame, WindowPtr oldWin);
+
+/*
+ * Copy bytes. (Optional)
+ * Source and destinate may overlap and the right thing should happen.
+ *
+ * width Bytes to copy per row
+ * height Number of rows
+ * src Source data
+ * srcRowBytes Width of source in bytes
+ * dst Destination data
+ * dstRowBytes Width of destination in bytes
+ */
+typedef void (*RootlessCopyBytesProc)
+ (unsigned int width, unsigned int height,
+ const void *src, unsigned int srcRowBytes,
+ void *dst, unsigned int dstRowBytes);
+
+/*
+ * Copy area in frame to another part of frame. (Optional)
+ *
+ * wid Frame id
+ * dstNrects Number of rectangles to copy
+ * dstRects Array of rectangles to copy
+ * dx, dy Number of pixels away to copy area
+ */
+typedef void (*RootlessCopyWindowProc)
+ (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
+ int dx, int dy);
+
diff --git a/xorg-server/miext/rootless/rootless.h b/xorg-server/miext/rootless/rootless.h
index 1046657c4..757e4d372 100644
--- a/xorg-server/miext/rootless/rootless.h
+++ b/xorg-server/miext/rootless/rootless.h
@@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec {
PixmapPtr pixmap;
-#ifdef ROOTLESS_TRACK_DAMAGE
- RegionRec damage;
-#endif
-
unsigned int is_drawing :1; // Currently drawing?
unsigned int is_reorder_pending :1;
unsigned int is_offscreen :1;
@@ -80,38 +76,14 @@ typedef struct _RootlessWindowRec {
/* Offset for screen-local to global coordinate transforms */
-#ifdef ROOTLESS_GLOBAL_COORDS
extern int rootlessGlobalOffsetX;
extern int rootlessGlobalOffsetY;
-#endif
/* The minimum number of bytes or pixels for which to use the
implementation's accelerated functions. */
extern unsigned int rootless_CopyBytes_threshold;
-extern unsigned int rootless_FillBytes_threshold;
-extern unsigned int rootless_CompositePixels_threshold;
extern unsigned int rootless_CopyWindow_threshold;
-/* Operations used by CompositePixels */
-enum rl_composite_op_enum {
- RL_COMPOSITE_SRC = 0,
- RL_COMPOSITE_OVER,
-};
-
-/* Data formats for depth field and composite functions */
-enum rl_depth_enum {
- RL_DEPTH_NIL = 0, /* null source when compositing */
- RL_DEPTH_ARGB8888,
- RL_DEPTH_RGB555,
- RL_DEPTH_A8, /* for masks when compositing */
- RL_DEPTH_INDEX8,
-};
-
-/* Macro to form the composite function for CompositePixels */
-#define RL_COMPOSITE_FUNCTION(op, src_depth, mask_depth, dest_depth) \
- (((op) << 24) | ((src_depth) << 16) \
- | ((mask_depth) << 8) | ((dest_depth) << 0))
-
/* Gravity for window contents during resizing */
enum rl_gravity_enum {
RL_GRAVITY_NONE = 0, /* no gravity, fill everything */
@@ -134,8 +106,7 @@ enum rl_gravity_enum {
* initialized before calling except for pFrame->wid, which
* is set by this function.
* pScreen Screen on which to place the new frame
- * newX, newY Position of the frame. These will be identical to pFrame-x,
- * pFrame->y unless ROOTLESS_GLOBAL_COORDS is set.
+ * newX, newY Position of the frame.
* pNewShape Shape for the frame (in frame-local coordinates). NULL for
* unshaped frames.
*/
@@ -227,8 +198,7 @@ typedef void (*RootlessStartDrawingProc)
* is started again.
*
* wid Frame id
- * flush Flush drawing updates for this frame to the screen. This
- * will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
+ * flush Flush drawing updates for this frame to the screen.
*/
typedef void (*RootlessStopDrawingProc)
(RootlessFrameID wid, Bool flush);
@@ -239,15 +209,13 @@ typedef void (*RootlessStopDrawingProc)
*
* wid Frame id
* pDamage Region containing all the changed pixels in frame-lcoal
- * coordinates. This is clipped to the window's clip. This
- * will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
+ * coordinates. This is clipped to the window's clip.
*/
typedef void (*RootlessUpdateRegionProc)
(RootlessFrameID wid, RegionPtr pDamage);
/*
* Mark damaged rectangles as requiring redisplay to screen.
- * This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
*
* wid Frame id
* nrects Number of damaged rectangles
@@ -302,44 +270,6 @@ typedef void (*RootlessCopyBytesProc)
void *dst, unsigned int dstRowBytes);
/*
- * Fill memory with 32-bit pattern. (Optional)
- *
- * width Bytes to fill per row
- * height Number of rows
- * value 32-bit pattern to fill with
- * dst Destination data
- * dstRowBytes Width of destination in bytes
- */
-typedef void (*RootlessFillBytesProc)
- (unsigned int width, unsigned int height, unsigned int value,
- void *dst, unsigned int dstRowBytes);
-
-/*
- * Composite pixels from source and mask to destination. (Optional)
- *
- * width, height Size of area to composite to in pizels
- * function Composite function built with RL_COMPOSITE_FUNCTION
- * src Source data
- * srcRowBytes Width of source in bytes (Passing NULL means source
- * is a single pixel.
- * mask Mask data
- * maskRowBytes Width of mask in bytes
- * dst Destination data
- * dstRowBytes Width of destination in bytes
- *
- * For src and dst, the first element of the array is the color data. If
- * the second element is non-null it implies there is alpha data (which
- * may be meshed or planar). Data without alpha is assumed to be opaque.
- *
- * An X11 error code is returned.
- */
-typedef int (*RootlessCompositePixelsProc)
- (unsigned int width, unsigned int height, unsigned int function,
- void *src[2], unsigned int srcRowBytes[2],
- void *mask, unsigned int maskRowBytes,
- void *dst[2], unsigned int dstRowBytes[2]);
-
-/*
* Copy area in frame to another part of frame. (Optional)
*
* wid Frame id
@@ -374,9 +304,7 @@ typedef struct _RootlessFrameProcs {
RootlessStartDrawingProc StartDrawing;
RootlessStopDrawingProc StopDrawing;
RootlessUpdateRegionProc UpdateRegion;
-#ifndef ROOTLESS_TRACK_DAMAGE
RootlessDamageRectsProc DamageRects;
-#endif
/* Optional frame functions */
RootlessSwitchWindowProc SwitchWindow;
@@ -386,8 +314,6 @@ typedef struct _RootlessFrameProcs {
/* Optional acceleration functions */
RootlessCopyBytesProc CopyBytes;
- RootlessFillBytesProc FillBytes;
- RootlessCompositePixelsProc CompositePixels;
RootlessCopyWindowProc CopyWindow;
} RootlessFrameProcsRec, *RootlessFrameProcsPtr;
@@ -398,13 +324,6 @@ typedef struct _RootlessFrameProcs {
Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs);
/*
- * Initialize acceleration for rootless mode on a given screen.
- * Note: RootlessAccelInit() must be called before DamageSetup()
- * and RootlessInit() must be called afterwards.
- */
-Bool RootlessAccelInit(ScreenPtr pScreen);
-
-/*
* Return the frame ID for the physical window displaying the given window.
*
* create If true and the window has no frame, attempt to create one
@@ -426,8 +345,7 @@ void RootlessStartDrawing(WindowPtr pWindow);
/*
* Finish drawing to a window's backing buffer.
*
- * flush If true and ROOTLESS_TRACK_DAMAGE is set, damaged areas
- * are flushed to the screen.
+ * flush If true, damaged areas are flushed to the screen.
*/
void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
diff --git a/xorg-server/miext/rootless/rootlessCommon.c b/xorg-server/miext/rootless/rootlessCommon.c
index 4f059801b..3ea3e5970 100644
--- a/xorg-server/miext/rootless/rootlessCommon.c
+++ b/xorg-server/miext/rootless/rootlessCommon.c
@@ -40,13 +40,9 @@
#include "colormapst.h"
unsigned int rootless_CopyBytes_threshold = 0;
-unsigned int rootless_FillBytes_threshold = 0;
-unsigned int rootless_CompositePixels_threshold = 0;
unsigned int rootless_CopyWindow_threshold = 0;
-#ifdef ROOTLESS_GLOBAL_COORDS
int rootlessGlobalOffsetX = 0;
int rootlessGlobalOffsetY = 0;
-#endif
RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};
@@ -305,16 +301,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
if (in == rgnIN) {
/* clip totally contains pRegion */
-#ifdef ROOTLESS_TRACK_DAMAGE
- RegionUnion(&winRec->damage,
- &winRec->damage, (pRegion));
-#else
SCREENREC(pWindow->drawable.pScreen)->imp->
DamageRects(winRec->wid,
RegionNumRects(pRegion),
RegionRects(pRegion),
-winRec->x, -winRec->y);
-#endif
RootlessQueueRedisplay(pTop->drawable.pScreen);
goto out;
@@ -331,16 +322,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
RegionNull(&clipped);
RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
-#ifdef ROOTLESS_TRACK_DAMAGE
- RegionUnion(&winRec->damage,
- &winRec->damage, (pRegion));
-#else
SCREENREC(pWindow->drawable.pScreen)->imp->
DamageRects(winRec->wid,
RegionNumRects(&clipped),
RegionRects(&clipped),
-winRec->x, -winRec->y);
-#endif
RegionUninit(&clipped);
@@ -415,32 +401,7 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h)
void
RootlessRedisplay(WindowPtr pWindow)
{
-#ifdef ROOTLESS_TRACK_DAMAGE
-
- RootlessWindowRec *winRec = WINREC(pWindow);
- ScreenPtr pScreen = pWindow->drawable.pScreen;
-
- RootlessStopDrawing(pWindow, FALSE);
-
- if (RegionNotEmpty(&winRec->damage)) {
- RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n",
- pWindow, winRec->width, winRec->height,
- winRec->x, winRec->y);
-
- // move region to window local coords
- RegionTranslate(&winRec->damage,
- -winRec->x, -winRec->y);
-
- SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage);
-
- RegionEmpty(&winRec->damage);
- }
-
-#else /* !ROOTLESS_TRACK_DAMAGE */
-
RootlessStopDrawing(pWindow, TRUE);
-
-#endif
}
diff --git a/xorg-server/miext/rootless/rootlessConfig.h b/xorg-server/miext/rootless/rootlessConfig.h
index 50bac3f51..1ad3afcf0 100644
--- a/xorg-server/miext/rootless/rootlessConfig.h
+++ b/xorg-server/miext/rootless/rootlessConfig.h
@@ -1,66 +1,62 @@
-/*
- * Platform specific rootless configuration
- */
-/*
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _ROOTLESSCONFIG_H
-#define _ROOTLESSCONFIG_H
-
-#ifdef __APPLE__
-
-# define ROOTLESS_GLOBAL_COORDS TRUE
-# define ROOTLESS_PROTECT_ALPHA TRUE
-# define ROOTLESS_REDISPLAY_DELAY 10
-# define ROOTLESS_RESIZE_GRAVITY TRUE
-# undef ROOTLESS_TRACK_DAMAGE
-/*# 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)
-
-# define ROOTLESS_GLOBAL_COORDS TRUE
-# define ROOTLESS_PROTECT_ALPHA NO
-# define ROOTLESS_REDISPLAY_DELAY 10
-# undef ROOTLESS_RESIZE_GRAVITY
-# undef ROOTLESS_TRACK_DAMAGE
-/*# define ROOTLESSDEBUG*/
-
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif /* __CYGWIN__ */
-
-#endif /* _ROOTLESSCONFIG_H */
+/*
+ * Platform specific rootless configuration
+ */
+/*
+ * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _ROOTLESSCONFIG_H
+#define _ROOTLESSCONFIG_H
+
+#ifdef __APPLE__
+
+# define ROOTLESS_PROTECT_ALPHA TRUE
+# define ROOTLESS_REDISPLAY_DELAY 10
+# 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)
+
+# define ROOTLESS_PROTECT_ALPHA NO
+# define ROOTLESS_REDISPLAY_DELAY 10
+# undef ROOTLESS_RESIZE_GRAVITY
+/*# define ROOTLESSDEBUG*/
+
+# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
+#endif /* __CYGWIN__ */
+
+#endif /* _ROOTLESSCONFIG_H */
diff --git a/xorg-server/miext/rootless/rootlessGC.c b/xorg-server/miext/rootless/rootlessGC.c
index 444342f6a..21a3bd806 100644
--- a/xorg-server/miext/rootless/rootlessGC.c
+++ b/xorg-server/miext/rootless/rootlessGC.c
@@ -148,9 +148,6 @@ static GCOps rootlessGCOps = {
};
/*
- There are two issues we must contend with when drawing. These are
- controlled with ROOTLESS_PROTECT_ALPHA and RootlessAccelInit().
-
If ROOTLESS_PROTECT_ALPHA is set, we have to make sure that the alpha
channel of the on screen windows is always opaque. fb makes this harder
than it would otherwise be by noticing that a planemask of 0x00ffffff
@@ -171,21 +168,8 @@ static GCOps rootlessGCOps = {
can do this when drawing op is GXcopy. We can also do this when copying
from another window since its alpha channel must also be opaque.
- The other issue to consider is that the rootless implementation may
- provide accelerated drawing functions if RootlessAccelInit() is called.For
- some drawing primitives we swap in rootless acceleration functions, which
- use the accelerated drawing functions where possible.
-
- Where both alpha protection and acceleration is used, it is even a bigger
- win to relax the planemask to all ones because most accelerated drawing
- functions can only be used in this case. However, even if we can't set
- the planemask to all ones, we can still use the accelerated
- CompositePixels function for GXcopy if it is a forward copy. This is
- mainly intended for copying from pixmaps to windows. The CompositePixels
- operation used sets alpha to 0xFF during the copy.
-
- The three macros below are used to implement this, potentially accelerated
- drawing ops look something like this:
+ The three macros below are used to implement this. Drawing ops that can
+ potentially have their planemask relaxed look like:
OP {
GC_SAVE(gc);
@@ -285,16 +269,6 @@ canAccelFill(DrawablePtr pDraw, GCPtr pGC)
return canAccelBlit(pDraw, pGC);
}
-static unsigned int
-boxBytes(DrawablePtr pDraw, BoxRec *box)
-{
- unsigned int pixels;
-
- pixels = (box->x2 - box->x1) * (box->y2 - box->y1);
-
- return pixels * (pDraw->bitsPerPixel >> 3);
-}
-
/*
* Screen function to create a graphics context
@@ -477,8 +451,7 @@ RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -584,15 +557,11 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC,
RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst);
if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) {
- unsigned int bytes;
-
/* If both source and dest are windows, and we're doing
a simple copy operation, we can remove the alpha-protecting
planemask (since source has opaque alpha as well) */
- bytes = w * h * (pSrc->depth >> 3);
-
- if (bytes >= rootless_CopyBytes_threshold && canAccelBlit(pSrc, pGC))
+ if (canAccelBlit(pSrc, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1064,8 +1033,7 @@ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1117,8 +1085,7 @@ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1170,8 +1137,7 @@ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1221,8 +1187,7 @@ static void RootlessImageText8(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1309,8 +1274,7 @@ static void RootlessImageText16(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
@@ -1408,8 +1372,7 @@ static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC,
RootlessStartDrawing((WindowPtr) dst);
- if (canAccelFill(dst, pGC) &&
- boxBytes(dst, &box) >= rootless_FillBytes_threshold)
+ if (canAccelFill(dst, pGC))
{
GC_UNSET_PM(pGC, dst);
}
diff --git a/xorg-server/miext/rootless/rootlessWindow.c b/xorg-server/miext/rootless/rootlessWindow.c
index e4fde4395..a86020cc5 100644
--- a/xorg-server/miext/rootless/rootlessWindow.c
+++ b/xorg-server/miext/rootless/rootlessWindow.c
@@ -51,15 +51,10 @@ extern Bool no_configure_window;
#include "rootlessCommon.h"
#include "rootlessWindow.h"
-#ifdef ROOTLESS_GLOBAL_COORDS
#define SCREEN_TO_GLOBAL_X \
(pScreen->x + rootlessGlobalOffsetX)
#define SCREEN_TO_GLOBAL_Y \
(pScreen->y + rootlessGlobalOffsetY)
-#else
-#define SCREEN_TO_GLOBAL_X 0
-#define SCREEN_TO_GLOBAL_Y 0
-#endif
#define DEFINE_ATOM_HELPER(func,atom_name) \
static Atom func (void) { \
@@ -180,11 +175,6 @@ static void
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
{
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
-
-#ifdef ROOTLESS_TRACK_DAMAGE
- RegionUninit(&winRec->damage);
-#endif
-
free(winRec);
SETWINREC(pWin, NULL);
}
@@ -341,15 +331,6 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y)
winRec->pixmap->devPrivate.ptr = winRec->pixelData;
SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw);
-
-#ifdef ROOTLESS_TRACK_DAMAGE
- // Move damaged region to correspond to new window position
- if (RegionNotEmpty(&winRec->damage)) {
- RegionTranslate(&winRec->damage,
- x - bw - winRec->x,
- y - bw - winRec->y);
- }
-#endif
}
}
@@ -381,10 +362,6 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
winRec->width = d->width + 2*bw;
winRec->height = d->height + 2*bw;
winRec->borderWidth = bw;
-
-#ifdef ROOTLESS_TRACK_DAMAGE
- RegionNull(&winRec->damage);
-#endif
}
/*