mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01: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>
(cherry picked from commit 7ed0c3912e)
This commit is contained in:
parent
a22b828dad
commit
26a5364d50
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue