aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render/mipict.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2015-03-29 04:26:10 +0200
committerMihai Moldovan <ionic@ionic.de>2015-03-29 04:26:10 +0200
commit0d56c45a7fc6350879377f368944a5832783764c (patch)
tree453b9537e05a98bf2b00401301a3fe17f38f46a5 /nx-X11/programs/Xserver/render/mipict.c
parent68be7d1c8ff0b36357e4af739f2c0e80283716af (diff)
downloadnx-libs-0d56c45a7fc6350879377f368944a5832783764c.tar.gz
nx-libs-0d56c45a7fc6350879377f368944a5832783764c.tar.bz2
nx-libs-0d56c45a7fc6350879377f368944a5832783764c.zip
nx-X11: handle source pictures (those without a Drawable surface) gracefully.
Cherry-picked from branch 3.5.0.x. This is basically a merge of the most current xorg-server (1.17.1) code into nx-X11. It makes sure that for source pictures, which do not have a drawable surface, a filter is selected that is supported on the "main" and all other screens. Alternatively, if the requested filter is not available on all screens and the picture is a source picture, this function fails gracefully. Additionally, the ChangePictureFilter hook is now called for non-source pictures. This also needs an implementation in mipict.{c,h}. The default hook does nothing and returns a success value.
Diffstat (limited to 'nx-X11/programs/Xserver/render/mipict.c')
-rw-r--r--nx-X11/programs/Xserver/render/mipict.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/render/mipict.c b/nx-X11/programs/Xserver/render/mipict.c
index 81c775832..59707ea70 100644
--- a/nx-X11/programs/Xserver/render/mipict.c
+++ b/nx-X11/programs/Xserver/render/mipict.c
@@ -250,6 +250,22 @@ miValidatePicture (PicturePtr pPicture,
}
}
+int
+miChangePictureTransform (PicturePtr pPicture,
+ PictTransform *transform)
+{
+ return Success;
+}
+
+int
+miChangePictureFilter (PicturePtr pPicture,
+ int filter,
+ xFixed *params,
+ int nparams)
+{
+ return Success;
+}
+
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
static __inline Bool
@@ -611,6 +627,8 @@ miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
ps->InitIndexed = miInitIndexed;
ps->CloseIndexed = miCloseIndexed;
ps->UpdateIndexed = miUpdateIndexed;
+ ps->ChangePictureTransform = miChangePictureTransform;
+ ps->ChangePictureFilter = miChangePictureFilter;
/* MI rendering routines */
ps->Composite = 0; /* requires DDX support */