Commit e4d11e58 authored by Eric Anholt's avatar Eric Anholt

Remove the PaintWindow optimization.

This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
parent 6da39c67
......@@ -504,7 +504,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
REGION_INTERSECT(pScreen, &reg, &reg, &pBuffer->clipList);
if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
miPaintWindow(pBuffer, &reg, PW_BACKGROUND);
if (generateExposures)
MultibufferExpose(pMBBuffer, &reg);
#ifdef _notdef
......@@ -517,7 +517,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
if (generateExposures)
(*pScreen->WindowExposures)(pBuffer, &reg, pBSReg);
else if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
miPaintWindow(pBuffer, &reg, PW_BACKGROUND);
#endif
REGION_UNINIT(pScreen, &reg);
if (pBSReg)
......@@ -836,8 +836,7 @@ bufClipNotify(pWin, dx,dy)
/*
* Updates buffer's background fields when the window's changes.
* This is necessary because pScreen->PaintWindowBackground
* is used to paint the buffer.
* This is necessary because miPaintWindow is used to paint the buffer.
*
* XXBS - Backingstore state will have be tracked too if it is supported.
*/
......@@ -927,7 +926,7 @@ bufWindowExposures(pWin, prgn, other_exposed)
pBuffer = (BufferPtr) pMBBuffer->pDrawable;
if (i != pMBWindow->displayedMultibuffer)
(* pScreen->PaintWindowBackground)(pBuffer,&tmp_rgn,PW_BACKGROUND);
miPaintWindow(pBuffer, &tmp_rgn, PW_BACKGROUND);
if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask)
MultibufferExpose(pMBBuffer, &tmp_rgn);
}
......
......@@ -6,7 +6,7 @@ libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC
DISTCLEANFILES = $(libafb_gen_sources)
libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpixmap.c \
libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpixmap.c \
afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \
afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \
afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \
......
......@@ -506,11 +506,6 @@ extern void afbCopyRotatePixmap(
int /*xrot*/,
int /*yrot*/
);
extern void afbPaintWindow(
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
);
/* afbpolypnt.c */
extern void afbPolyPoint(
......@@ -744,16 +739,6 @@ extern int frameWindowPrivateIndex; /* index into Window private array */
#define afbGetGCPrivate(pGC) \
((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr))
/* private field of window */
typedef struct {
unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
unsigned char fastBackground;
unsigned short unused; /* pad for alignment with Sun compiler */
DDXPointRec oldRotate;
PixmapPtr pRotatedBackground;
PixmapPtr pRotatedBorder;
} afbPrivWin;
/* Common macros for extracting drawing information */
#define afbGetTypedWidth(pDrawable,wtype)( \
......
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
Copyright (c) 1987 X Consortium
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
X CONSORTIUM 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 of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
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 Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL 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.
******************************************************************/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h>
#include "windowstr.h"
#include "regionstr.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
#include "afb.h"
#include "maskbits.h"
#include "mi.h"
void
afbPaintWindow(pWin, pRegion, what)
WindowPtr pWin;
RegionPtr pRegion;
int what;
{
register afbPrivWin *pPrivWin;
unsigned char rrops[AFB_MAX_DEPTH];
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
switch (what) {
case PW_BACKGROUND:
switch (pWin->backgroundState) {
case None:
return;
case ParentRelative:
do {
pWin = pWin->parent;
} while (pWin->backgroundState == ParentRelative);
(*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
what);
return;
case BackgroundPixmap:
if (pPrivWin->fastBackground) {
afbTileAreaPPWCopy((DrawablePtr)pWin,
REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), GXcopy,
pPrivWin->pRotatedBackground, ~0);
return;
} else {
afbTileAreaCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), GXcopy,
pWin->background.pixmap, 0, 0, ~0);
return;
}
break;
case BackgroundPixel:
afbReduceRop(GXcopy, pWin->background.pixel, ~0,
pWin->drawable.depth, rrops);
afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), rrops);
return;
}
break;
case PW_BORDER:
if (pWin->borderIsPixel) {
afbReduceRop(GXcopy, pWin->border.pixel, ~0, pWin->drawable.depth,
rrops);
afbSolidFillArea((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), rrops);
return;
} else if (pPrivWin->fastBorder) {
afbTileAreaPPWCopy((DrawablePtr)pWin, REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion), GXcopy,
pPrivWin->pRotatedBorder, ~0);
return;
}
break;
}
miPaintWindow(pWin, pRegion, what);
}
......@@ -71,7 +71,6 @@ SOFTWARE.
#ifdef PIXMAP_PER_WINDOW
int frameWindowPrivateIndex;
#endif
int afbWindowPrivateIndex;
int afbGCPrivateIndex;
int afbScreenPrivateIndex;
......@@ -140,20 +139,16 @@ afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex)
#ifdef PIXMAP_PER_WINDOW
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
#endif
afbWindowPrivateIndex = AllocateWindowPrivateIndex();
afbGCPrivateIndex = AllocateGCPrivateIndex();
afbGeneration = serverGeneration;
}
if (pWinIndex)
*pWinIndex = afbWindowPrivateIndex;
if (pGCIndex)
*pGCIndex = afbGCPrivateIndex;
afbScreenPrivateIndex = AllocateScreenPrivateIndex();
pScreen->GetWindowPixmap = afbGetWindowPixmap;
pScreen->SetWindowPixmap = afbSetWindowPixmap;
return(AllocateWindowPrivate(pScreen, afbWindowPrivateIndex, sizeof(afbPrivWin)) &&
AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC)));
return(AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC)));
}
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
......@@ -198,8 +193,6 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i
pScreen->ChangeWindowAttributes = afbChangeWindowAttributes;
pScreen->RealizeWindow = afbMapWindow;
pScreen->UnrealizeWindow = afbUnmapWindow;
pScreen->PaintWindowBackground = afbPaintWindow;
pScreen->PaintWindowBorder = afbPaintWindow;
pScreen->CopyWindow = afbCopyWindow;
pScreen->CreatePixmap = afbCreatePixmap;
pScreen->DestroyPixmap = afbDestroyPixmap;
......
......@@ -62,39 +62,16 @@ SOFTWARE.
#include "maskbits.h"
Bool
afbCreateWindow(pWin)
register WindowPtr pWin;
afbCreateWindow(WindowPtr pWin)
{
register afbPrivWin *pPrivWin;
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
pPrivWin->pRotatedBorder = NullPixmap;
pPrivWin->pRotatedBackground = NullPixmap;
pPrivWin->fastBackground = FALSE;
pPrivWin->fastBorder = FALSE;
#ifdef PIXMAP_PER_WINDOW
pWin->devPrivates[frameWindowPrivateIndex].ptr =
pWin->pDrawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr;
#endif
return (TRUE);
}
/* This always returns true, because Xfree can't fail. It might be possible
* on some devices for Destroy to fail */
Bool
afbDestroyWindow(pWin)
WindowPtr pWin;
afbDestroyWindow(WindowPtr pWin)
{
register afbPrivWin *pPrivWin;
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
if (pPrivWin->pRotatedBorder)
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
if (pPrivWin->pRotatedBackground)
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
return (TRUE);
}
......@@ -106,46 +83,10 @@ afbMapWindow(pWindow)
return (TRUE);
}
/* (x, y) is the upper left corner of the window on the screen
do we really need to pass this? (is it a;ready in pWin->absCorner?)
we only do the rotation for pixmaps that are 32 bits wide (padded
or otherwise.)
afbChangeWindowAttributes() has already put a copy of the pixmap
in pPrivWin->pRotated*
*/
/*ARGSUSED*/
Bool
afbPositionWindow(pWin, x, y)
WindowPtr pWin;
int x, y;
afbPositionWindow(WindowPtr pWin, int x, int y)
{
register afbPrivWin *pPrivWin;
int reset = 0;
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) {
afbXRotatePixmap(pPrivWin->pRotatedBackground,
pWin->drawable.x - pPrivWin->oldRotate.x);
afbYRotatePixmap(pPrivWin->pRotatedBackground,
pWin->drawable.y - pPrivWin->oldRotate.y);
reset = 1;
}
if (!pWin->borderIsPixel && pPrivWin->fastBorder) {
while (pWin->backgroundState == ParentRelative)
pWin = pWin->parent;
afbXRotatePixmap(pPrivWin->pRotatedBorder,
pWin->drawable.x - pPrivWin->oldRotate.x);
afbYRotatePixmap(pPrivWin->pRotatedBorder,
pWin->drawable.y - pPrivWin->oldRotate.y);
reset = 1;
}
if (reset) {
pPrivWin->oldRotate.x = pWin->drawable.x;
pPrivWin->oldRotate.y = pWin->drawable.y;
}
/* This is the "wrong" fix to the right problem, but it doesn't really
* cost very much. When the window is moved, we need to invalidate any
* RotatedPixmap that exists in any GC currently validated against this
......@@ -215,104 +156,8 @@ afbCopyWindow(pWin, ptOldOrg, prgnSrc)
REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
}
/* swap in correct PaintWindow* routine. If we can use a fast output
routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy
of it in devPrivate.
*/
Bool
afbChangeWindowAttributes(pWin, mask)
register WindowPtr pWin;
register unsigned long mask;
afbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
{
register unsigned long index;
register afbPrivWin *pPrivWin;
WindowPtr pBgWin;
pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr);
/*
* When background state changes from ParentRelative and
* we had previously rotated the fast border pixmap to match
* the parent relative origin, rerotate to match window
*/
if (mask & (CWBackPixmap | CWBackPixel) &&
pWin->backgroundState != ParentRelative && pPrivWin->fastBorder &&
(pPrivWin->oldRotate.x != pWin->drawable.x ||
pPrivWin->oldRotate.y != pWin->drawable.y)) {
afbXRotatePixmap(pPrivWin->pRotatedBorder,
pWin->drawable.x - pPrivWin->oldRotate.x);
afbYRotatePixmap(pPrivWin->pRotatedBorder,
pWin->drawable.y - pPrivWin->oldRotate.y);
pPrivWin->oldRotate.x = pWin->drawable.x;
pPrivWin->oldRotate.y = pWin->drawable.y;
}
while(mask) {
index = lowbit (mask);
mask &= ~index;
switch(index) {
case CWBackPixmap:
if (pWin->backgroundState == None)
pPrivWin->fastBackground = FALSE;
else if (pWin->backgroundState == ParentRelative) {
pPrivWin->fastBackground = FALSE;
/* Rotate border to match parent origin */
if (pPrivWin->pRotatedBorder) {
for (pBgWin = pWin->parent;
pBgWin->backgroundState == ParentRelative;
pBgWin = pBgWin->parent);
afbXRotatePixmap(pPrivWin->pRotatedBorder,
pBgWin->drawable.x - pPrivWin->oldRotate.x);
afbYRotatePixmap(pPrivWin->pRotatedBorder,
pBgWin->drawable.y - pPrivWin->oldRotate.y);
pPrivWin->oldRotate.x = pBgWin->drawable.x;
pPrivWin->oldRotate.y = pBgWin->drawable.y;
}
} else if ((pWin->background.pixmap->drawable.width <= PPW) &&
!(pWin->background.pixmap->drawable.width &
(pWin->background.pixmap->drawable.width - 1))) {
afbCopyRotatePixmap(pWin->background.pixmap,
&pPrivWin->pRotatedBackground,
pWin->drawable.x, pWin->drawable.y);
if (pPrivWin->pRotatedBackground) {
pPrivWin->fastBackground = TRUE;
pPrivWin->oldRotate.x = pWin->drawable.x;
pPrivWin->oldRotate.y = pWin->drawable.y;
} else
pPrivWin->fastBackground = FALSE;
} else
pPrivWin->fastBackground = FALSE;
break;
case CWBackPixel:
pPrivWin->fastBackground = FALSE;
break;
case CWBorderPixmap:
if ((pWin->border.pixmap->drawable.width <= PPW) &&
!(pWin->border.pixmap->drawable.width &
(pWin->border.pixmap->drawable.width - 1))) {
for (pBgWin = pWin;
pBgWin->backgroundState == ParentRelative;
pBgWin = pBgWin->parent);
afbCopyRotatePixmap(pWin->border.pixmap,
&pPrivWin->pRotatedBorder,
pBgWin->drawable.x, pBgWin->drawable.y);
if (pPrivWin->pRotatedBorder) {
pPrivWin->fastBorder = TRUE;
pPrivWin->oldRotate.x = pBgWin->drawable.x;
pPrivWin->oldRotate.y = pBgWin->drawable.y;
} else
pPrivWin->fastBorder = FALSE;
} else
pPrivWin->fastBorder = FALSE;
break;
case CWBorderPixel:
pPrivWin->fastBorder = FALSE;
break;
}
}
/* Again, we have no failure modes indicated by any of the routines
* we've called, so we have to assume it worked */
return (TRUE);
}
......@@ -8,7 +8,7 @@ DISTCLEANFILES = $(libcfb_gen_sources)
CFB_INCLUDES = -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
libcfb_common_sources = $(top_srcdir)/cfb/cfbgc.c $(top_srcdir)/cfb/cfbrrop.c \
$(top_srcdir)/cfb/cfbwindow.c $(top_srcdir)/cfb/cfbpntwin.c \
$(top_srcdir)/cfb/cfbwindow.c \
$(top_srcdir)/cfb/cfbmskbits.c $(top_srcdir)/cfb/cfbpixmap.c \
$(top_srcdir)/cfb/cfbbitblt.c $(top_srcdir)/cfb/cfbfillsp.c \
$(top_srcdir)/cfb/cfbsetsp.c $(top_srcdir)/cfb/cfbscrinit.c \
......
......@@ -56,7 +56,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
extern int cfbGCPrivateIndex;
extern int cfbWindowPrivateIndex;
/* private field of GC */
typedef struct {
......@@ -81,20 +80,6 @@ typedef struct {
CfbBits xor, and;
} cfbRRopRec, *cfbRRopPtr;
/* private field of window */
typedef struct {
unsigned char fastBorder; /* non-zero if border is 32 bits wide */
unsigned char fastBackground;
unsigned short unused; /* pad for alignment with Sun compiler */
DDXPointRec oldRotate;
PixmapPtr pRotatedBackground;
PixmapPtr pRotatedBorder;
} cfbPrivWin;
#define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\
(_pWin)->devPrivates[cfbWindowPrivateIndex].ptr)
/* cfb8bit.c */
extern int cfbSetStipple(
......@@ -313,7 +298,6 @@ extern int cfb8SegmentSS1RectXor(
extern Bool cfbAllocatePrivates(
ScreenPtr /*pScreen*/,
int * /*window_index*/,
int * /*gc_index*/
);
/* cfbbitblt.c */
......@@ -806,27 +790,6 @@ extern void cfbFillPoly1RectGeneral(
int /*count*/,
DDXPointPtr /*ptsIn*/
);
/* cfbpntwin.c */
extern void cfbPaintWindow(
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
);
extern void cfbFillBoxSolid(
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
unsigned long /*pixel*/
);
extern void cfbFillBoxTile32(
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
PixmapPtr /*tile*/
);
/* cfbpolypnt.c */
extern void cfbPolyPoint(
......
......@@ -45,7 +45,6 @@ in this Software without prior written authorization from The Open Group.
#include "mibstore.h"
#if 1 || PSZ==8
int cfbWindowPrivateIndex = -1;
int cfbGCPrivateIndex = -1;
#endif
#ifdef CFB_NEED_SCREEN_PRIVATE
......@@ -55,29 +54,20 @@ static unsigned long cfbGeneration = 0;
Bool
cfbAllocatePrivates(pScreen, window_index, gc_index)
ScreenPtr pScreen;
int *window_index, *gc_index;
cfbAllocatePrivates(ScreenPtr pScreen, int *gc_index)
{
if (!window_index || !gc_index ||
(*window_index == -1 && *gc_index == -1))
if (!gc_index || *gc_index == -1)
{
if (!mfbAllocatePrivates(pScreen,
&cfbWindowPrivateIndex, &cfbGCPrivateIndex))
if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex))
return FALSE;
if (window_index)
*window_index = cfbWindowPrivateIndex;
if (gc_index)
*gc_index = cfbGCPrivateIndex;
}
else
{
cfbWindowPrivateIndex = *window_index;
cfbGCPrivateIndex = *gc_index;
}
if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex,
sizeof(cfbPrivWin)) ||
!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
if (!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
return FALSE;
#ifdef CFB_NEED_SCREEN_PRIVATE
if (cfbGeneration != serverGeneration)
......
......@@ -71,8 +71,6 @@ in this Software without prior written authorization from The Open Group.
#undef cfbDoBitbltGeneral
#undef cfbDoBitbltOr
#undef cfbDoBitbltXor
#undef cfbFillBoxSolid
#undef cfbFillBoxTile32
#undef cfbFillBoxTile32sCopy
#undef cfbFillBoxTile32sGeneral
#undef cfbFillBoxTileOdd
......@@ -108,7 +106,6 @@ in this Software without prior written authorization from The Open Group.
#undef cfbNonTEOps
#undef cfbNonTEOps1Rect
#undef cfbPadPixmap
#undef cfbPaintWindow
#undef cfbPolyFillArcSolidCopy
#undef cfbPolyFillArcSolidGeneral
#undef cfbPolyFillRect
......@@ -250,8 +247,6 @@ cfb can not hack PSZ yet
#define cfbDoBitbltOr CFBNAME(DoBitbltOr)
#define cfbDoBitbltXor CFBNAME(DoBitbltXor)
#define cfbExpandDirectColors CFBNAME(cfbExpandDirectColors)
#define cfbFillBoxSolid CFBNAME(FillBoxSolid)
#define cfbFillBoxTile32 CFBNAME(FillBoxTile32)
#define cfbFillBoxTile32sCopy CFBNAME(FillBoxTile32sCopy)
#define cfbFillBoxTile32sGeneral CFBNAME(FillBoxTile32sGeneral)
#define cfbFillBoxTileOdd CFBNAME(FillBoxTileOdd)
......@@ -288,7 +283,6 @@ cfb can not hack PSZ yet
#define cfbNonTEOps CFBNAME(NonTEOps)
#define cfbNonTEOps1Rect CFBNAME(NonTEOps1Rect)
#define cfbPadPixmap CFBNAME(PadPixmap)
#define cfbPaintWindow CFBNAME(PaintWindow)
#define cfbPolyFillArcSolidCopy CFBNAME(PolyFillArcSolidCopy)
#define cfbPolyFillArcSolidGeneral CFBNAME(PolyFillArcSolidGeneral)
#define cfbPolyFillRect CFBNAME(PolyFillRect)
......
This diff is collapsed.
......@@ -88,7 +88,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
int dpix, dpiy; /* dots per inch */
int width; /* pixel width of frame buffer */
{
if (!cfbAllocatePrivates(pScreen, (int *) 0, (int *) 0))
if (!cfbAllocatePrivates(pScreen, NULL))
return FALSE;
pScreen->defColormap = FakeClientID(0);
/* let CreateDefColormap do whatever it wants for pixels */
......@@ -103,8 +103,6 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->ChangeWindowAttributes = cfbChangeWindowAttributes;
pScreen->RealizeWindow = cfbMapWindow;
pScreen->UnrealizeWindow = cfbUnmapWindow;
pScreen->PaintWindowBackground = cfbPaintWindow;
pScreen->PaintWindowBorder = cfbPaintWindow;
pScreen->CopyWindow = cfbCopyWindow;
pScreen->CreatePixmap = cfbCreatePixmap;
pScreen->DestroyPixmap = cfbDestroyPixmap;
......
/*
* Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow.
* Fill 32 bit tiled rectangles. Used by PolyFillRect.
* no depth dependencies.
*/
......
......@@ -74,8 +74,6 @@
#undef cfbDoBitbltOr
#undef cfbDoBitbltXor
#undef cfbExpandDirectColors
#undef cfbFillBoxSolid
#undef cfbFillBoxTile32
#undef cfbFillBoxTile32sCopy
#undef cfbFillBoxTile32sGeneral
#undef cfbFillBoxTileOdd
......@@ -112,7 +110,6 @@
#undef cfbNonTEOps
#undef cfbNonTEOps1Rect
#undef cfbPadPixmap
#undef cfbPaintWindow
#undef cfbPolyFillArcSolidCopy
#undef cfbPolyFillArcSolidGeneral
#undef cfbPolyFillRect
......
......@@ -60,19 +60,8 @@ SOFTWARE.
#include "cfbmskbits.h"
Bool
cfbCreateWindow(pWin)
WindowPtr pWin;
cfbCreateWindow(WindowPtr pWin)
{
cfbPrivWin *pPrivWin;
pPrivWin = cfbGetWindowPrivate(pWin);
pPrivWin->pRotatedBorder = NullPixmap;
pPrivWin->pRotatedBackground = NullPixmap;
pPrivWin->fastBackground = FALSE;
pPrivWin->fastBorder = FALSE;
pPrivWin->oldRotate.x = 0;
pPrivWin->oldRotate.y = 0;
#ifdef PIXMAP_PER_WINDOW
/* Setup pointer to Screen pixmap */
pWin->devPrivates[frameWindowPrivateIndex].ptr =
......@@ -83,17 +72,8 @@ cfbCreateWindow(pWin)
}
Bool
cfbDestroyWindow(pWin)
WindowPtr pWin;
cfbDestroyWindow(WindowPtr pWin)
{
cfbPrivWin *pPrivWin;
pPrivWin = cfbGetWindowPrivate(pWin);
if (pPrivWin->pRotatedBorder)
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder);
if (pPrivWin->pRotatedBackground)
(*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBackground);
return(TRUE);
}
......@@ -105,47 +85,10 @@ cfbMapWindow(pWindow)
return(TRUE);
}
/* (x, y) is the upper left corner of the window on the screen
do we really need to pass this? (is it a;ready in pWin->absCorner?)
we only do the rotation for pixmaps that are 32 bits wide (padded
or otherwise.)
cfbChangeWindowAttributes() has already put a copy of the pixmap
in pPrivWin->pRotated*
*/
/*ARGSUSED*/
Bool
cfbPositionWindow(pWin, x, y)
WindowPtr pWin;
int x, y;
cfbPositionWindow(WindowPtr pWin, int x, int y)
{
cfbPrivWin *pPrivWin;
int setxy = 0;
pPrivWin = cfbGetWindowPrivate(pWin);
if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground)
{
cfbXRotatePixmap(pPrivWin->pRotatedBackground,
pWin->drawable.x - pPrivWin->oldRotate.x);
cfbYRotatePixmap(pPrivWin->pRotatedBackground,