[PATCH 1/2] render: Allow single-stop gradients
Andrea Canciani
ranma42 at gmail.com
Tue Nov 2 12:10:31 PDT 2010
The Render specification allows single-stop gradients and pixman can
correctly rasterize them.
---
render/picture.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/render/picture.c b/render/picture.c
index 7fda6b9..c8ea486 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -937,7 +937,7 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2,
{
PicturePtr pPicture;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}
@@ -978,7 +978,7 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer
PicturePtr pPicture;
PictRadialGradient *radial;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}
@@ -1026,7 +1026,7 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle,
{
PicturePtr pPicture;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}
--
1.7.1
More information about the xorg-devel
mailing list