aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c86
-rw-r--r--nx-X11/programs/Xserver/render/Imakefile4
-rw-r--r--nx-X11/programs/Xserver/render/miglyph.c2
3 files changed, 5 insertions, 87 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
index f86c81de6..bdc0bc316 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
@@ -40,77 +40,9 @@
* Author: Keith Packard, SuSE, Inc.
*/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "scrnintstr.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "mi.h"
-#include "picturestr.h"
-#include "mipict.h"
-
-#ifdef NXAGENT_SERVER
-
#include "Render.h"
-#endif
-
-void
-miGlyphExtents (int nlist,
- GlyphListPtr list,
- GlyphPtr *glyphs,
- BoxPtr extents)
-{
- int x1, x2, y1, y2;
- int n;
- GlyphPtr glyph;
- int x, y;
-
- x = 0;
- y = 0;
- extents->x1 = MAXSHORT;
- extents->x2 = MINSHORT;
- extents->y1 = MAXSHORT;
- extents->y2 = MINSHORT;
- while (nlist--)
- {
- x += list->xOff;
- y += list->yOff;
- n = list->len;
- list++;
- while (n--)
- {
- glyph = *glyphs++;
- x1 = x - glyph->info.x;
- if (x1 < MINSHORT)
- x1 = MINSHORT;
- y1 = y - glyph->info.y;
- if (y1 < MINSHORT)
- y1 = MINSHORT;
- x2 = x1 + glyph->info.width;
- if (x2 > MAXSHORT)
- x2 = MAXSHORT;
- y2 = y1 + glyph->info.height;
- if (y2 > MAXSHORT)
- y2 = MAXSHORT;
- if (x1 < extents->x1)
- extents->x1 = x1;
- if (x2 > extents->x2)
- extents->x2 = x2;
- if (y1 < extents->y1)
- extents->y1 = y1;
- if (y2 > extents->y2)
- extents->y2 = y2;
- x += glyph->info.xOff;
- y += glyph->info.yOff;
- }
- }
-}
-
-#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+#include "../../render/miglyph.c"
void
miGlyphs (CARD8 op,
@@ -137,8 +69,6 @@ miGlyphs (CARD8 op,
BoxRec extents;
CARD32 component_alpha;
- #ifdef NXAGENT_SERVER
-
/*
* Get rid of the warning.
*/
@@ -146,15 +76,11 @@ miGlyphs (CARD8 op,
extents.x1 = 0;
extents.y1 = 0;
- #endif
-
if (maskFormat)
{
GCPtr pGC;
xRectangle rect;
- #ifdef NXAGENT_SERVER
-
if (nxagentGlyphsExtents != NullBox)
{
memcpy(&extents, nxagentGlyphsExtents, sizeof(BoxRec));
@@ -168,12 +94,6 @@ miGlyphs (CARD8 op,
memcpy(nxagentGlyphsExtents, &extents, sizeof(BoxRec));
}
- #else
-
- miGlyphExtents (nlist, list, glyphs, &extents);
-
- #endif
-
if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1)
return;
width = extents.x2 - extents.x1;
@@ -242,8 +162,6 @@ miGlyphs (CARD8 op,
glyph->info.width, glyph->info.height,
0, 0, -1, (void *) (glyph + 1));
- #ifdef NXAGENT_SERVER
-
/*
* The following line fixes a problem with glyphs that appeared
* as clipped. It was a side effect due the validate function
@@ -254,8 +172,6 @@ miGlyphs (CARD8 op,
pPicture->pDrawable->serialNumber = NEXT_SERIAL_NUMBER;
- #endif
-
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
if (maskFormat)
{
diff --git a/nx-X11/programs/Xserver/render/Imakefile b/nx-X11/programs/Xserver/render/Imakefile
index d6e2f4c40..0685ef3f6 100644
--- a/nx-X11/programs/Xserver/render/Imakefile
+++ b/nx-X11/programs/Xserver/render/Imakefile
@@ -6,9 +6,11 @@ NULL =
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
+ miglyph.c \
mitrap.c \
$(NULL)
NXAGENT_SKIP_OBJS = \
+ miglyph.o \
mitrap.o \
$(NULL)
#endif
@@ -17,7 +19,6 @@ NXAGENT_SKIP_OBJS = \
filter.c \
glyph.c \
matrix.c \
- miglyph.c \
miindex.c \
mipict.c \
mirect.c \
@@ -32,7 +33,6 @@ NXAGENT_SKIP_OBJS = \
filter.o \
glyph.o \
matrix.o \
- miglyph.o \
miindex.o \
mipict.o \
mirect.o \
diff --git a/nx-X11/programs/Xserver/render/miglyph.c b/nx-X11/programs/Xserver/render/miglyph.c
index 8b046bd46..f169c3bb7 100644
--- a/nx-X11/programs/Xserver/render/miglyph.c
+++ b/nx-X11/programs/Xserver/render/miglyph.c
@@ -89,6 +89,7 @@ miGlyphExtents (int nlist,
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+#ifndef NXAGENT_SERVER
void
miGlyphs (CARD8 op,
PicturePtr pSrc,
@@ -241,3 +242,4 @@ miGlyphs (CARD8 op,
(*pScreen->DestroyPixmap) (pMaskPixmap);
}
}
+#endif