summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-07-14 13:14:28 -0700
committerJamey Sharp <jamey@minilop.net>2010-09-13 15:58:08 -0700
commit20798536326f94ac9c97b4ec7a51329f7c912991 (patch)
tree4f5e50552421d824e37d6d304a4c8259ba046aca
parent58d1ec0fe84412c66f1ea1de15e3901c0b120164 (diff)
rootless: Delete dead remnants of rootless acceleration.
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit 587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the remaining commented-out call to it. It still makes sense for the rootless GC ops to relax the planemask, but that's independent of the size of the operation, so quit checking the thresholds there. FillBytes and CompositePixels are not called anywhere, so delete everything related to both. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/xpr/xprFrame.c4
-rw-r--r--hw/xquartz/xpr/xprScreen.c6
-rw-r--r--hw/xwin/win.h10
-rw-r--r--hw/xwin/winscrinit.c4
-rwxr-xr-xhw/xwin/winwin32rootless.c22
-rw-r--r--miext/rootless/README.txt41
-rw-r--r--miext/rootless/rootless.h69
-rw-r--r--miext/rootless/rootlessCommon.c2
-rw-r--r--miext/rootless/rootlessGC.c57
9 files changed, 11 insertions, 204 deletions
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 42f06efee..c78c5bd31 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -463,8 +463,6 @@ static RootlessFrameProcsRec xprRootlessProcs = {
xprHideWindow,
xprUpdateColormap,
xp_copy_bytes,
- xp_fill_bytes,
- xp_composite_pixels,
xprCopyWindow
};
@@ -480,8 +478,6 @@ xprInit(ScreenPtr pScreen)
TA_SERVER();
rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
- rootless_FillBytes_threshold = xp_fill_bytes_threshold;
- rootless_CompositePixels_threshold = xp_composite_area_threshold;
rootless_CopyWindow_threshold = xp_scroll_area_threshold;
return TRUE;
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 87e97d4e2..c03a82d03 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -367,12 +367,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
- // Initialize accelerated rootless drawing
- // Note that this must be done before DamageSetup().
-
- // These are crashing ugly... better to be stable and not crash for now.
- //RootlessAccelInit(pScreen);
-
#ifdef DAMAGE
// The Damage extension needs to wrap underneath the
// generic rootless layer, so do it now.
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 8c4b67f17..1b1358cda 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1377,16 +1377,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int height,
void *dst, unsigned int dstRowBytes);
void
-winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int value,
- void *dst, unsigned int dstRowBytes);
-
-int
-winMWExtWMCompositePixels (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]);
-
-void
winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects,
int dx, int dy);
#endif
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index d7324100a..cf65881fe 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -61,8 +61,6 @@ winMWExtWMProcs = {
NULL,//winMWExtWMUpdateColorMap,
NULL,//winMWExtWMCopyBytes,
- NULL,//winMWExtWMFillBytes,
- NULL,//winMWExtWMCompositePixels,
winMWExtWMCopyWindow
};
#endif
@@ -463,8 +461,6 @@ winFinishScreenInitFB (int index,
winDebug ("winScreenInit - MultiWindowExtWM - RootlessInit returned\n");
rootless_CopyBytes_threshold = 0;
- rootless_FillBytes_threshold = 0;
- rootless_CompositePixels_threshold = 0;
/* FIXME: How many? Profiling needed? */
rootless_CopyWindow_threshold = 1;
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 9749861fd..fbe419132 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -1007,28 +1007,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int height,
}
void
-winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int value,
- void *dst, unsigned int dstRowBytes)
-{
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("winMWExtWMFillBytes - Not implemented\n");
-#endif
-}
-
-int
-winMWExtWMCompositePixels (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])
-{
-#if CYGMULTIWINDOW_DEBUG
- winDebug ("winMWExtWMCompositePixels - Not implemented\n");
-#endif
- return 0;
-}
-
-
-void
winMWExtWMCopyWindow (RootlessFrameID wid, int nDstRects, const BoxRec *pDstRects,
int nDx, int nDy)
{
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index 7ec5c41b6..754715d33 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -102,8 +102,7 @@ rootlessConfig.h:
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:
+ 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
@@ -322,44 +321,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
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index b2d8d0f07..3d4a1b077 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -82,30 +82,8 @@ extern int rootlessGlobalOffsetY;
/* 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 */
@@ -292,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,8 +314,6 @@ typedef struct _RootlessFrameProcs {
/* Optional acceleration functions */
RootlessCopyBytesProc CopyBytes;
- RootlessFillBytesProc FillBytes;
- RootlessCompositePixelsProc CompositePixels;
RootlessCopyWindowProc CopyWindow;
} RootlessFrameProcsRec, *RootlessFrameProcsPtr;
@@ -386,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
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index a9cd72a41..861e8e858 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -40,8 +40,6 @@
#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;
int rootlessGlobalOffsetX = 0;
int rootlessGlobalOffsetY = 0;
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 6af8d857f..68a9dc764 100644
--- a/miext/rootless/rootlessGC.c
+++ b/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);
}