summaryrefslogtreecommitdiff
path: root/render/mipict.c
diff options
context:
space:
mode:
authorLars Knoll <lars@trolltech.com>2005-07-01 10:05:43 +0000
committerLars Knoll <lars@trolltech.com>2005-07-01 10:05:43 +0000
commitb5b2a0522efd61bd99b5d5d75cdd27960cd1c7e1 (patch)
tree455e2c8151f463288783b6e4e8fa29939cde4d3c /render/mipict.c
parent30c019e847adef6f7f3963df8ef1f3f994669a54 (diff)
Add support for gradients and solid fills to Render.
Changed the semantics of the Convolution filter a bit. It now doesn't try to normalize the filter values but leaves this to the client. This gives more reasonable behaviour in the limit where the filter parameters sum up to 0.
Diffstat (limited to 'render/mipict.c')
-rw-r--r--render/mipict.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/render/mipict.c b/render/mipict.c
index 5b2da0f37..a16e88cd9 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -296,7 +296,7 @@ miClipPictureSrc (RegionPtr pRegion,
int dy)
{
/* XXX what to do with clipping from transformed pictures? */
- if (pPicture->transform)
+ if (pPicture->transform || !pPicture->pDrawable)
return TRUE;
if (pPicture->repeat)
{
@@ -331,7 +331,12 @@ miCompositeSourceValidate (PicturePtr pPicture,
CARD16 height)
{
DrawablePtr pDrawable = pPicture->pDrawable;
- ScreenPtr pScreen = pDrawable->pScreen;
+ ScreenPtr pScreen;
+
+ if (!pDrawable)
+ return;
+
+ pScreen = pDrawable->pScreen;
if (pScreen->SourceValidate)
{
@@ -521,8 +526,13 @@ miFillColor (CARD32 pixel, int bits)
Bool
miIsSolidAlpha (PicturePtr pSrc)
{
- ScreenPtr pScreen = pSrc->pDrawable->pScreen;
+ ScreenPtr pScreen;
char line[1];
+
+ if (!pSrc->pDrawable)
+ return FALSE;
+
+ pScreen = pSrc->pDrawable->pScreen;
/* Alpha-only */
if (PICT_FORMAT_TYPE (pSrc->format) != PICT_TYPE_A)