summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-07-27 10:52:31 +0200
committerAdam Jackson <ajax@redhat.com>2015-09-23 10:34:43 -0400
commit7ed0c3912e1cbab960df308b9d4ea618be757fd2 (patch)
tree0efa42da42a3af9fc021bac59b8a66b65b39d54d /render
parent3d9f578e6f0d13ecada7dc677fe61a4dd3d05e18 (diff)
render: Allow single-stop gradients
The Render specification allows single-stop gradients and pixman 0.22 (X server requires >= 0.27.2 now) can rasterize them correctly. [ajax: update commit message] Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <ssp@redhat.com>
Diffstat (limited to 'render')
-rw-r--r--render/picture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/render/picture.c b/render/picture.c
index 506aec419..acdd0ae3c 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -902,7 +902,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2,
{
PicturePtr pPicture;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}
@@ -942,7 +942,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner,
PicturePtr pPicture;
PictRadialGradient *radial;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}
@@ -985,7 +985,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle,
{
PicturePtr pPicture;
- if (nStops < 2) {
+ if (nStops < 1) {
*error = BadValue;
return 0;
}