The Render specification allows single-stop gradients and pixman 0.22
(which the X server depends on) can rasterize them correctly.

Signed-off-by: Andrea Canciani <[email protected]>
---
 render/picture.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/render/picture.c b/render/picture.c
index 5640c4d..d91b43a 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -886,7 +886,7 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, 
xPointFixed *p2,
 {
     PicturePtr pPicture;
 
-    if (nStops < 2) {
+    if (nStops < 1) {
         *error = BadValue;
         return 0;
     }
@@ -925,7 +925,7 @@ CreateRadialGradientPicture (Picture pid, xPointFixed 
*inner, xPointFixed *outer
     PicturePtr pPicture;
     PictRadialGradient *radial;
 
-    if (nStops < 2) {
+    if (nStops < 1) {
         *error = BadValue;
         return 0;
     }
@@ -967,7 +967,7 @@ CreateConicalGradientPicture (Picture pid, xPointFixed 
*center, xFixed angle,
 {
     PicturePtr pPicture;
 
-    if (nStops < 2) {
+    if (nStops < 1) {
         *error = BadValue;
         return 0;
     }
-- 
1.7.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to