summaryrefslogtreecommitdiff
path: root/render/picturestr.h
diff options
context:
space:
mode:
authorSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-04-19 18:19:34 -0400
committerSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-04-19 18:19:34 -0400
commit0a9239ec258828ec1da6c208634a55fc4053d7da (patch)
tree94cbfdc17c409f9c1cb609edb7eb5cd0974ee954 /render/picturestr.h
parentd0e55774e0da641ba85c5173f27f68de27372747 (diff)
Merge David Reveman's gradient optimization patch from pixman
Diffstat (limited to 'render/picturestr.h')
-rw-r--r--render/picturestr.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/render/picturestr.h b/render/picturestr.h
index f1617f627..3f3c600f8 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -68,8 +68,13 @@ typedef struct _PictTransform {
#define SourcePictTypeRadial 2
#define SourcePictTypeConical 3
+#define SourcePictClassUnknown 0
+#define SourcePictClassHorizontal 1
+#define SourcePictClassVertical 2
+
typedef struct _PictSolidFill {
unsigned int type;
+ unsigned int class;
CARD32 color;
} PictSolidFill, *PictSolidFillPtr;
@@ -80,16 +85,22 @@ typedef struct _PictGradientStop {
typedef struct _PictGradient {
unsigned int type;
+ unsigned int class;
int nstops;
PictGradientStopPtr stops;
- CARD32 colorTable[PICT_GRADIENT_STOPTABLE_SIZE];
+ int stopRange;
+ CARD32 *colorTable;
+ int colorTableSize;
} PictGradient, *PictGradientPtr;
typedef struct _PictLinearGradient {
unsigned int type;
+ unsigned int class;
int nstops;
PictGradientStopPtr stops;
- CARD32 colorTable[PICT_GRADIENT_STOPTABLE_SIZE];
+ int stopRange;
+ CARD32 *colorTable;
+ int colorTableSize;
xPointFixed p1;
xPointFixed p2;
} PictLinearGradient, *PictLinearGradientPtr;
@@ -98,7 +109,6 @@ typedef struct _PictRadialGradient {
unsigned int type;
int nstops;
PictGradientStopPtr stops;
- CARD32 colorTable[PICT_GRADIENT_STOPTABLE_SIZE];
double fx;
double fy;
double dx;
@@ -110,9 +120,12 @@ typedef struct _PictRadialGradient {
typedef struct _PictConicalGradient {
unsigned int type;
+ unsigned int class;
int nstops;
PictGradientStopPtr stops;
- CARD32 colorTable[PICT_GRADIENT_STOPTABLE_SIZE];
+ int stopRange;
+ CARD32 *colorTable;
+ int colorTableSize;
xPointFixed center;
xFixed angle;
} PictConicalGradient, *PictConicalGradientPtr;
@@ -624,6 +637,11 @@ Bool
PictureTransformPoint3d (PictTransformPtr transform,
PictVectorPtr vector);
+CARD32
+PictureGradientColor (PictGradientStopPtr stop1,
+ PictGradientStopPtr stop2,
+ CARD32 x);
+
void RenderExtensionInit (void);
Bool