Commit 0dab6fa3 authored by Adam Jackson's avatar Adam Jackson 🎧

So long, and thanks for all the cfb.

parent 059b4876
......@@ -9,11 +9,6 @@ if XTRAP
XTRAP_DIR=XTrap
endif
if CFB
CFB_DIR=cfb
CFB32_DIR=cfb32
endif
if AFB
AFB_DIR=afb
endif
......@@ -50,8 +45,6 @@ SUBDIRS = \
$(DBE_DIR) \
$(MFB_DIR) \
$(AFB_DIR) \
$(CFB_DIR) \
$(CFB32_DIR) \
$(RECORD_DIR) \
xfixes \
damageext \
......@@ -96,8 +89,6 @@ DIST_SUBDIRS = \
dbe \
mfb \
afb \
cfb \
cfb32 \
record \
xfixes \
damageext \
......
noinst_LTLIBRARIES = libcfb.la
include Makefile.am.inc
DISTCLEANFILES += cfbglrop8.c
libcfb_la_SOURCES = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c \
$(libcfb_gen_sources) $(libcfb_common_sources)
libcfb_la_LIBADD = ../mfb/libmfb.la
AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS)
INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common
EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \
cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \
cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \
stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s
sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h
libcfb_gen_sources = cfbseg.c cfbfillarcC.c cfbfillarcG.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \
cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c cfbsolidC.c cfbsolidX.c cfbsolidG.c cfbtileoddC.c \
cfbtileoddG.c cfbtile32C.c cfbtile32G.c cfb8lineCO.c cfb8lineCP.c cfb8lineX.c cfb8lineG.c \
cfb8segCS.c cfb8segC.c cfb8segX.c cfb8setG.c cfbply1rctC.c cfbply1rctG.c
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/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 \
$(top_srcdir)/cfb/cfballpriv.c $(top_srcdir)/cfb/cfbgetsp.c \
$(top_srcdir)/cfb/cfbfillrct.c $(top_srcdir)/cfb/cfbigblt8.c \
$(top_srcdir)/cfb/cfbglblt8.c $(top_srcdir)/cfb/cfbtegblt.c \
$(top_srcdir)/cfb/cfbpolypnt.c \
$(top_srcdir)/cfb/cfbbres.c $(top_srcdir)/cfb/cfbline.c \
$(top_srcdir)/cfb/cfbhrzvert.c $(top_srcdir)/cfb/cfbbresd.c \
$(top_srcdir)/cfb/cfbimage.c $(top_srcdir)/cfb/cfbcppl.c \
$(top_srcdir)/cfb/cfbcmap.c
cfbseg.c:
echo "#define POLYSEGMENT" > $@
echo "#include \"$(top_srcdir)/cfb/cfbline.c\"" >> $@
cfbfillarcC.c:
echo "#define RROP GXcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@
cfbfillarcG.c:
echo "#define RROP GXset" > $@
echo "#include \"$(top_srcdir)/cfb/cfbfillarc.c\"" >> $@
cfbzerarcC.c:
echo "#define RROP GXcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@
cfbzerarcX.c:
echo "#define RROP GXxor" > $@
echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@
cfbzerarcG.c:
echo "#define RROP GXset" > $@
echo "#include \"$(top_srcdir)/cfb/cfbzerarc.c\"" >> $@
cfbbltC.c:
echo "#define MROP Mcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@
cfbbltX.c:
echo "#define MROP Mxor" > $@
echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@
cfbbltO.c:
echo "#define MROP Mor" > $@
echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@
cfbbltG.c:
echo "#define MROP 0" > $@
echo "#include \"$(top_srcdir)/cfb/cfbblt.c\"" >> $@
cfbsolidC.c:
echo "#define RROP GXcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@
cfbsolidX.c:
echo "#define RROP GXxor" > $@
echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@
cfbsolidG.c:
echo "#define RROP GXset" > $@
echo "#include \"$(top_srcdir)/cfb/cfbsolid.c\"" >> $@
cfbtileoddC.c:
echo "#define MROP Mcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@
cfbtileoddG.c:
echo "#define MROP 0" > $@
echo "#include \"$(top_srcdir)/cfb/cfbtileodd.c\"" >> $@
cfbtile32C.c:
echo "#define MROP Mcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@
cfbtile32G.c:
echo "#define MROP 0" > $@
echo "#include \"$(top_srcdir)/cfb/cfbtile32.c\"" >> $@
cfb8lineCO.c:
echo "#define RROP GXcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8lineCP.c:
echo "#define RROP GXcopy" > $@
echo "#define PREVIOUS" >> $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8lineX.c:
echo "#define RROP GXxor" > $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8lineG.c:
echo "#define RROP GXset" > $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8segCS.c:
echo "#define RROP GXcopy" > $@
echo "#define POLYSEGMENT" >> $@
echo "#define WIDTH_SHIFT" >> $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8segC.c:
echo "#define RROP GXcopy" > $@
echo "#define POLYSEGMENT" >> $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8segX.c:
echo "#define RROP GXxor" > $@
echo "#define POLYSEGMENT" >> $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfb8setG.c:
echo "#define RROP GXset" > $@
echo "#define POLYSEGMENT" >> $@
echo "#include \"$(top_srcdir)/cfb/cfb8line.c\"" >> $@
cfbply1rctC.c:
echo "#define RROP GXcopy" > $@
echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@
cfbply1rctG.c:
echo "#define RROP GXset" > $@
echo "#include \"$(top_srcdir)/cfb/cfbply1rct.c\"" >> $@
cfbglrop8.c:
echo "#define GLYPHROP" > $@
echo "#include \"$(top_srcdir)/cfb/cfbglblt8.c\"" >> $@
if XPRINT
PLATFORMDEFS = -DXFREE86
cfb8bit.o: compiler.h
compiler.h:
echo "#include \"$(top_srcdir)/hw/xfree86/common/compiler.h\"" >> $@
endif
This diff is collapsed.
/*
* Copyright (C) 1994-1998 The XFree86 Project, Inc. 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
* XFREE86 PROJECT 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 XFree86 Project 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
* XFree86 Project.
*/
#ifndef _CFB16_H_
#define _CFB16_H_
/*
* C's preprocessing language substitutes >text<, not values...
*/
#ifdef OLDPSZ
# undef OLDPSZ
#endif
#ifdef PSZ
# if (PSZ == 8)
# define OLDPSZ 8
# endif
# if (PSZ == 16)
# define OLDPSZ 16
# endif
# if (PSZ == 24)
# define OLDPSZ 24
# endif
# if (PSZ == 32)
# define OLDPSZ 32
# endif
# ifndef OLDPSZ
/* Maybe an #error here ? */
# endif
# undef PSZ
#endif
#define PSZ 16
#define CFB_PROTOTYPES_ONLY
#include "cfb.h"
#undef CFB_PROTOTYPES_ONLY
#include "cfbunmap.h"
#undef PSZ
#ifdef OLDPSZ
# if (OLDPSZ == 8)
# define PSZ 8
# endif
# if (OLDPSZ == 16)
# define PSZ 16
# endif
# if (OLDPSZ == 24)
# define PSZ 24
# endif
# if (OLDPSZ == 32)
# define PSZ 32
# endif
# undef OLDPSZ
#endif
#endif /* _CFB16_H_ */
/*
* Copyright (C) 1994-1998 The XFree86 Project, Inc. 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
* XFREE86 PROJECT 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 XFree86 Project 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
* XFree86 Project.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _CFB24_H_
#define _CFB24_H_
/*
* C's preprocessing language substitutes >text<, not values...
*/
#ifdef OLDPSZ
# undef OLDPSZ
#endif
#ifdef PSZ
# if (PSZ == 8)
# define OLDPSZ 8
# endif
# if (PSZ == 16)
# define OLDPSZ 16
# endif
# if (PSZ == 24)
# define OLDPSZ 24
# endif
# if (PSZ == 32)
# define OLDPSZ 32
# endif
# ifndef OLDPSZ
/* Maybe an #error here ? */
# endif
# undef PSZ
#endif
#define PSZ 24
#define CFB_PROTOTYPES_ONLY
#include "cfb.h"
#undef CFB_PROTOTYPES_ONLY
#include "cfbunmap.h"
#undef PSZ
#ifdef OLDPSZ
# if (OLDPSZ == 8)
# define PSZ 8
# endif
# if (OLDPSZ == 16)
# define PSZ 16
# endif
# if (OLDPSZ == 24)
# define PSZ 24
# endif
# if (OLDPSZ == 32)
# define PSZ 32
# endif
# undef OLDPSZ
#endif
#endif /* _CFB24_H_ */
/*
* Copyright (C) 1994-1998 The XFree86 Project, Inc. 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
* XFREE86 PROJECT 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 XFree86 Project 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
* XFree86 Project.
*/
#ifndef _CFB32_H_
#define _CFB32_H_
/*
* C's preprocessing language substitutes >text<, not values...
*/
#ifdef OLDPSZ
# undef OLDPSZ
#endif
#ifdef PSZ
# if (PSZ == 8)
# define OLDPSZ 8
# endif
# if (PSZ == 16)
# define OLDPSZ 16
# endif
# if (PSZ == 24)
# define OLDPSZ 24
# endif
# if (PSZ == 32)
# define OLDPSZ 32
# endif
# ifndef OLDPSZ
/* Maybe an #error here ? */
# endif
# undef PSZ
#endif
#define PSZ 32
#define CFB_PROTOTYPES_ONLY
#include "cfb.h"
#undef CFB_PROTOTYPES_ONLY
#include "cfbunmap.h"
#undef PSZ
#ifdef OLDPSZ
# if (OLDPSZ == 8)
# define PSZ 8
# endif
# if (OLDPSZ == 16)
# define PSZ 16
# endif
# if (OLDPSZ == 24)
# define PSZ 24
# endif
# if (OLDPSZ == 32)
# define PSZ 32
# endif
# undef OLDPSZ
#endif
#endif /* _CFB32_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
*
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
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
OPEN GROUP 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 Open Group 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 Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h>
#include <X11/Xmd.h>
#include "servermd.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "resource.h"
#include "colormap.h"
#include "colormapst.h"
#include "cfb.h"
#include "mi.h"
#include "mistruct.h"
#include "dix.h"
#include "cfbmskbits.h"
#include "mibstore.h"
#if 1 || PSZ==8
DevPrivateKey cfbGCPrivateKey = &cfbGCPrivateKey;
#endif
#ifdef CFB_NEED_SCREEN_PRIVATE
DevPrivateKey cfbScreenPrivateKey = &cfbScreenPrivateKey;
#endif
Bool
cfbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *gc_key)
{
if (!gc_key || !*gc_key)
{
if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey))
return FALSE;
if (gc_key)
*gc_key = cfbGCPrivateKey;
}
else
{
cfbGCPrivateKey = *gc_key;
}
return dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC));
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/************************************************************
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
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 no-
tice appear in all copies and that both that copyright no-
tice and this permission notice appear in supporting docu-
mentation, and that the names of Sun or The Open Group
not be used in advertising or publicity pertaining to
distribution of the software without specific prior
written permission. Sun and The Open Group make no
representations about the suitability of this software for
any purpose. It is provided "as is" without any express or
implied warranty.
SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
ABLE 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 <X11/Xproto.h>
#include "scrnintstr.h"
#include "colormapst.h"
#include "resource.h"
#include "micmap.h"
#include "cfb.h"
int
cfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
return miListInstalledColormaps(pScreen, pmaps);
}
void
cfbInstallColormap(ColormapPtr pmap)
{
miInstallColormap(pmap);
}
void
cfbUninstallColormap(ColormapPtr pmap)
{
miUninstallColormap(pmap);
}
void
cfbResolveColor(unsigned short *pred,
unsigned short *pgreen,
unsigned short *pblue,
VisualPtr pVisual)
{
miResolveColor(pred, pgreen, pblue, pVisual);
}
Bool
cfbInitializeColormap(ColormapPtr pmap)
{
return miInitializeColormap(pmap);
}
int
cfbExpandDirectColors (ColormapPtr pmap, int ndef,
xColorItem *indefs, xColorItem *outdefs)
{
return miExpandDirectColors(pmap, ndef, indefs, outdefs);
}
Bool
cfbCreateDefColormap(ScreenPtr pScreen)
{
return miCreateDefColormap(pScreen);
}
void
cfbClearVisualTypes(void)
{
miClearVisualTypes();
}
Bool
cfbSetVisualTypes (int depth, int visuals, int bitsPerRGB)
{
return miSetVisualTypes(depth, visuals, bitsPerRGB, -1);
}
/*
* Given a list of formats for a screen, create a list
* of visuals and depths for the screen which coorespond to
* the set which can be used with this version of cfb.
*/
Bool
cfbInitVisuals (VisualPtr *visualp,
DepthPtr *depthp,
int *nvisualp,
int *ndepthp,
int *rootDepthp,
VisualID *defaultVisp,
unsigned long sizes,
int bitsPerRGB)
{
return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp,
defaultVisp, sizes, bitsPerRGB, -1);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.