Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
ae1a218d
Commit
ae1a218d
authored
Apr 08, 2016
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hw/nxagent/NXmiglyph.c: Shrink file, drop code that can be identically found in render/miglyph.c.
parent
500544f8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
87 deletions
+5
-87
NXmiglyph.c
nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
+1
-85
Imakefile
nx-X11/programs/Xserver/render/Imakefile
+2
-2
miglyph.c
nx-X11/programs/Xserver/render/miglyph.c
+2
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c
View file @
ae1a218d
...
@@ -40,77 +40,9 @@
...
@@ -40,77 +40,9 @@
* Author: Keith Packard, SuSE, Inc.
* 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"
#include "Render.h"
#endif
#include "../../render/miglyph.c"
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)
void
void
miGlyphs
(
CARD8
op
,
miGlyphs
(
CARD8
op
,
...
@@ -137,8 +69,6 @@ miGlyphs (CARD8 op,
...
@@ -137,8 +69,6 @@ miGlyphs (CARD8 op,
BoxRec
extents
;
BoxRec
extents
;
CARD32
component_alpha
;
CARD32
component_alpha
;
#ifdef NXAGENT_SERVER
/*
/*
* Get rid of the warning.
* Get rid of the warning.
*/
*/
...
@@ -146,15 +76,11 @@ miGlyphs (CARD8 op,
...
@@ -146,15 +76,11 @@ miGlyphs (CARD8 op,
extents
.
x1
=
0
;
extents
.
x1
=
0
;
extents
.
y1
=
0
;
extents
.
y1
=
0
;
#endif
if
(
maskFormat
)
if
(
maskFormat
)
{
{
GCPtr
pGC
;
GCPtr
pGC
;
xRectangle
rect
;
xRectangle
rect
;
#ifdef NXAGENT_SERVER
if
(
nxagentGlyphsExtents
!=
NullBox
)
if
(
nxagentGlyphsExtents
!=
NullBox
)
{
{
memcpy
(
&
extents
,
nxagentGlyphsExtents
,
sizeof
(
BoxRec
));
memcpy
(
&
extents
,
nxagentGlyphsExtents
,
sizeof
(
BoxRec
));
...
@@ -168,12 +94,6 @@ miGlyphs (CARD8 op,
...
@@ -168,12 +94,6 @@ miGlyphs (CARD8 op,
memcpy
(
nxagentGlyphsExtents
,
&
extents
,
sizeof
(
BoxRec
));
memcpy
(
nxagentGlyphsExtents
,
&
extents
,
sizeof
(
BoxRec
));
}
}
#else
miGlyphExtents
(
nlist
,
list
,
glyphs
,
&
extents
);
#endif
if
(
extents
.
x2
<=
extents
.
x1
||
extents
.
y2
<=
extents
.
y1
)
if
(
extents
.
x2
<=
extents
.
x1
||
extents
.
y2
<=
extents
.
y1
)
return
;
return
;
width
=
extents
.
x2
-
extents
.
x1
;
width
=
extents
.
x2
-
extents
.
x1
;
...
@@ -242,8 +162,6 @@ miGlyphs (CARD8 op,
...
@@ -242,8 +162,6 @@ miGlyphs (CARD8 op,
glyph
->
info
.
width
,
glyph
->
info
.
height
,
glyph
->
info
.
width
,
glyph
->
info
.
height
,
0
,
0
,
-
1
,
(
void
*
)
(
glyph
+
1
));
0
,
0
,
-
1
,
(
void
*
)
(
glyph
+
1
));
#ifdef NXAGENT_SERVER
/*
/*
* The following line fixes a problem with glyphs that appeared
* The following line fixes a problem with glyphs that appeared
* as clipped. It was a side effect due the validate function
* as clipped. It was a side effect due the validate function
...
@@ -254,8 +172,6 @@ miGlyphs (CARD8 op,
...
@@ -254,8 +172,6 @@ miGlyphs (CARD8 op,
pPicture
->
pDrawable
->
serialNumber
=
NEXT_SERIAL_NUMBER
;
pPicture
->
pDrawable
->
serialNumber
=
NEXT_SERIAL_NUMBER
;
#endif
pPixmap
->
drawable
.
serialNumber
=
NEXT_SERIAL_NUMBER
;
pPixmap
->
drawable
.
serialNumber
=
NEXT_SERIAL_NUMBER
;
if
(
maskFormat
)
if
(
maskFormat
)
{
{
...
...
nx-X11/programs/Xserver/render/Imakefile
View file @
ae1a218d
...
@@ -6,9 +6,11 @@ NULL =
...
@@ -6,9 +6,11 @@ NULL =
#if (!(defined(NXAgentServer) && NXAgentServer))
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
NXAGENT_SKIP_SRCS = \
miglyph.c \
mitrap.c \
mitrap.c \
$(NULL)
$(NULL)
NXAGENT_SKIP_OBJS = \
NXAGENT_SKIP_OBJS = \
miglyph.o \
mitrap.o \
mitrap.o \
$(NULL)
$(NULL)
#endif
#endif
...
@@ -17,7 +19,6 @@ NXAGENT_SKIP_OBJS = \
...
@@ -17,7 +19,6 @@ NXAGENT_SKIP_OBJS = \
filter.c \
filter.c \
glyph.c \
glyph.c \
matrix.c \
matrix.c \
miglyph.c \
miindex.c \
miindex.c \
mipict.c \
mipict.c \
mirect.c \
mirect.c \
...
@@ -32,7 +33,6 @@ NXAGENT_SKIP_OBJS = \
...
@@ -32,7 +33,6 @@ NXAGENT_SKIP_OBJS = \
filter.o \
filter.o \
glyph.o \
glyph.o \
matrix.o \
matrix.o \
miglyph.o \
miindex.o \
miindex.o \
mipict.o \
mipict.o \
mirect.o \
mirect.o \
...
...
nx-X11/programs/Xserver/render/miglyph.c
View file @
ae1a218d
...
@@ -89,6 +89,7 @@ miGlyphExtents (int nlist,
...
@@ -89,6 +89,7 @@ miGlyphExtents (int nlist,
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
#ifndef NXAGENT_SERVER
void
void
miGlyphs
(
CARD8
op
,
miGlyphs
(
CARD8
op
,
PicturePtr
pSrc
,
PicturePtr
pSrc
,
...
@@ -241,3 +242,4 @@ miGlyphs (CARD8 op,
...
@@ -241,3 +242,4 @@ miGlyphs (CARD8 op,
(
*
pScreen
->
DestroyPixmap
)
(
pMaskPixmap
);
(
*
pScreen
->
DestroyPixmap
)
(
pMaskPixmap
);
}
}
}
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment