mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
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>
This commit is contained in:
committed by
Adam Jackson
parent
3d9f578e6f
commit
7ed0c3912e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user