diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-07-27 10:52:31 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2015-10-26 12:19:29 -0400 |
commit | 26a5364d507dff012283dc5d6f86b80c5936a807 (patch) | |
tree | 90bf13535f070161e7eeabbe7d4c2017a384aeeb | |
parent | a22b828dad72091210234a9e671c93015c970ac6 (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>
(cherry picked from commit 7ed0c3912e1cbab960df308b9d4ea618be757fd2)
-rw-r--r-- | render/picture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/render/picture.c b/render/picture.c index 6ff31ba02..cef7032a2 100644 --- a/render/picture.c +++ b/render/picture.c @@ -896,7 +896,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, { PicturePtr pPicture; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } @@ -936,7 +936,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, PicturePtr pPicture; PictRadialGradient *radial; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } @@ -979,7 +979,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, { PicturePtr pPicture; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } |