mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 03:48:03 +02:00
Switch to use new fbRasterizeTrapezoid. Gut old IcRasterizeTrapezoid implementation. Remove lots of code, (and all the bugs with it).
Replace IcRasterizeTrapezoid with fbRasterizeTrapezoid. Add a couple of missing typedefs. Minor changes to allow things to compile within libpixman tree, (replace xserver include directives with pixman-xserver-compat.h and sprinkle a few const qualifiers). Add sources for new point-sampling rasterization.
This commit is contained in:
parent
c64e2ccd06
commit
13225d4d3b
10 changed files with 53 additions and 1377 deletions
|
|
@ -1,5 +1,24 @@
|
|||
2005-01-21 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* src/ictri.c (IcRasterizeTriangle):
|
||||
* src/ictrap.c (pixman_composite_trapezoids): Switch to use new
|
||||
fbRasterizeTrapezoid. Gut old IcRasterizeTrapezoid
|
||||
implementation. Remove lots of code, (and all the bugs with it).
|
||||
|
||||
* src/icint.h: Replace IcRasterizeTrapezoid with
|
||||
fbRasterizeTrapezoid. Add a couple of missing typedefs.
|
||||
|
||||
* src/renderedge.h:
|
||||
* src/renderedge.c (RenderLineFixedEdgeInit):
|
||||
* src/fbtrap.c:
|
||||
|
||||
* src/fbedge.c: Minor changes to allow things to compile within
|
||||
libpixman tree, (replace xserver include directives with
|
||||
pixman-xserver-compat.h and sprinkle a few const qualifiers).
|
||||
|
||||
* src/Makefile.am (libpixman_la_SOURCES): Add sources for new
|
||||
point-sampling rasterization.
|
||||
|
||||
* src/fbtrap.c: Merge in changes from xserver, (mostly just
|
||||
whitespace).
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ libpixman_la_SOURCES = \
|
|||
ictransform.c \
|
||||
ictri.c \
|
||||
icutil.c \
|
||||
fbedge.c \
|
||||
fbtrap.c \
|
||||
renderedge.c \
|
||||
renderedge.h \
|
||||
slim_internal.h
|
||||
|
||||
libpixman_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: fbedge.c,v 1.1 2005-01-18 19:54:23 cworth Exp $
|
||||
* $Id: fbedge.c,v 1.2 2005-01-21 18:26:28 cworth Exp $
|
||||
*
|
||||
* Copyright © 2004 Keith Packard
|
||||
*
|
||||
|
|
@ -22,18 +22,10 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "fb.h"
|
||||
#include "pixman-xserver-compat.h"
|
||||
|
||||
#ifdef RENDER
|
||||
|
||||
#include "picturestr.h"
|
||||
#include "mipict.h"
|
||||
#include "renderedge.h"
|
||||
#include "fbpict.h"
|
||||
|
||||
/*
|
||||
* 8 bit alpha
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: fbtrap.c,v 1.2 2005-01-21 17:26:44 cworth Exp $
|
||||
* $Id: fbtrap.c,v 1.3 2005-01-21 18:26:28 cworth Exp $
|
||||
*
|
||||
* Copyright © 2004 Keith Packard
|
||||
*
|
||||
|
|
@ -22,18 +22,12 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "fb.h"
|
||||
#include "pixman-xserver-compat.h"
|
||||
|
||||
#ifdef RENDER
|
||||
|
||||
#include "picturestr.h"
|
||||
#include "mipict.h"
|
||||
#include "renderedge.h"
|
||||
#include "fbpict.h"
|
||||
|
||||
/* XXX: Haven't added addTraps to libpixman yet. */
|
||||
#if 0
|
||||
void
|
||||
fbAddTraps (PicturePtr pPicture,
|
||||
INT16 x_off,
|
||||
|
|
@ -95,10 +89,11 @@ fbAddTraps (PicturePtr pPicture,
|
|||
traps++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
fbRasterizeTrapezoid (PicturePtr pPicture,
|
||||
xTrapezoid *trap,
|
||||
const xTrapezoid *trap,
|
||||
int x_off,
|
||||
int y_off)
|
||||
{
|
||||
|
|
@ -143,6 +138,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
|
|||
}
|
||||
}
|
||||
|
||||
/* XXX: Haven't add addTriangles to libpixman yet. */
|
||||
#if 0
|
||||
static int
|
||||
_GreaterY (xPointFixed *a, xPointFixed *b)
|
||||
{
|
||||
|
|
@ -234,5 +231,6 @@ fbAddTriangles (PicturePtr pPicture,
|
|||
fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RENDER */
|
||||
|
|
|
|||
|
|
@ -754,6 +754,14 @@ typedef uint32_t Pixel;
|
|||
pixman_private pixman_bits_t
|
||||
IcReplicatePixel (Pixel p, int bpp);
|
||||
|
||||
/* fbtrap.c */
|
||||
|
||||
pixman_private void
|
||||
fbRasterizeTrapezoid (pixman_image_t *pMask,
|
||||
const pixman_trapezoid_t *pTrap,
|
||||
int x_off,
|
||||
int y_off);
|
||||
|
||||
/* XXX: This is to avoid including gc.h from the server includes */
|
||||
/* clientClipType field in GC */
|
||||
#define CT_NONE 0
|
||||
|
|
@ -812,14 +820,6 @@ pixman_private int
|
|||
pixman_transform_point (pixman_transform_t *transform,
|
||||
pixman_vector_t *vector);
|
||||
|
||||
/* ictrap.c */
|
||||
|
||||
pixman_private void
|
||||
IcRasterizeTrapezoid (pixman_image_t *pMask,
|
||||
const pixman_trapezoid_t *pTrap,
|
||||
int x_off,
|
||||
int y_off);
|
||||
|
||||
/* Avoid unnessecary PLT entries. */
|
||||
|
||||
slim_hidden_proto(pixman_image_create)
|
||||
|
|
@ -840,7 +840,6 @@ slim_hidden_proto(pixman_composite)
|
|||
|
||||
typedef struct _DirectFormat *DirectFormatPtr;
|
||||
typedef struct _PictFormat *PictFormatPtr;
|
||||
typedef struct _Picture *PicturePtr;
|
||||
|
||||
/*
|
||||
* While the protocol is generous in format support, the
|
||||
|
|
@ -993,6 +992,7 @@ typedef long long int xFixed_32_32;
|
|||
# endif
|
||||
#endif
|
||||
|
||||
typedef xFixed_32_32 xFixed_48_16;
|
||||
typedef uint32_t xFixed_1_31;
|
||||
typedef uint32_t xFixed_1_16;
|
||||
typedef int32_t xFixed_16_16;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include "icint.h"
|
||||
|
||||
typedef xFixed_32_32 xFixed_48_16;
|
||||
|
||||
#define MAX_FIXED_48_16 ((xFixed_48_16) 0x7fffffff)
|
||||
#define MIN_FIXED_48_16 (-((xFixed_48_16) 1 << 31))
|
||||
|
||||
|
|
|
|||
1337
pixman/src/ictrap.c
1337
pixman/src/ictrap.c
File diff suppressed because it is too large
Load diff
|
|
@ -129,9 +129,9 @@ IcRasterizeTriangle (pixman_image_t *image,
|
|||
trap[1].left.p2 = trap[0].right.p2;
|
||||
}
|
||||
if (trap[0].top != trap[0].bottom)
|
||||
IcRasterizeTrapezoid (image, &trap[0], x_off, y_off);
|
||||
fbRasterizeTrapezoid (image, &trap[0], x_off, y_off);
|
||||
if (trap[1].top != trap[1].bottom)
|
||||
IcRasterizeTrapezoid (image, &trap[1], x_off, y_off);
|
||||
fbRasterizeTrapezoid (image, &trap[1], x_off, y_off);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: renderedge.c,v 1.1 2005-01-18 19:54:23 cworth Exp $
|
||||
* $Id: renderedge.c,v 1.2 2005-01-21 18:26:28 cworth Exp $
|
||||
*
|
||||
* Copyright © 2004 Keith Packard
|
||||
*
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "renderedge.h"
|
||||
#include "pixman-xserver-compat.h"
|
||||
|
||||
/*
|
||||
* Compute the smallest value no less than y which is on a
|
||||
|
|
@ -170,13 +170,13 @@ void
|
|||
RenderLineFixedEdgeInit (RenderEdge *e,
|
||||
int n,
|
||||
xFixed y,
|
||||
xLineFixed *line,
|
||||
const xLineFixed *line,
|
||||
int x_off,
|
||||
int y_off)
|
||||
{
|
||||
xFixed x_off_fixed = IntToxFixed(x_off);
|
||||
xFixed y_off_fixed = IntToxFixed(y_off);
|
||||
xPointFixed *top, *bot;
|
||||
const xPointFixed *top, *bot;
|
||||
|
||||
if (line->p1.y <= line->p2.y)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: renderedge.h,v 1.1 2005-01-18 19:54:23 cworth Exp $
|
||||
* $Id: renderedge.h,v 1.2 2005-01-21 18:26:28 cworth Exp $
|
||||
*
|
||||
* Copyright © 2004 Keith Packard
|
||||
*
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef _RENDEREDGE_H_
|
||||
#define _RENDEREDGE_H_
|
||||
|
||||
#include "picturestr.h"
|
||||
#include "pixman-xserver-compat.h"
|
||||
|
||||
#define MAX_ALPHA(n) ((1 << (n)) - 1)
|
||||
#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
|
||||
|
|
@ -113,7 +113,7 @@ void
|
|||
RenderLineFixedEdgeInit (RenderEdge *e,
|
||||
int bpp,
|
||||
xFixed y,
|
||||
xLineFixed *line,
|
||||
const pixman_line_fixed_t *line,
|
||||
int x_off,
|
||||
int y_off);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue