#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
+#include <X11/extensions/Xfixes.h>
+#include <X11/extensions/Xdamage.h>
static int va_DisplayContextIsValid (
VADisplayContextP pDisplayContext
unsigned int flags /* de-interlacing flags */
);
-
+static void va_report_damage(VADriverContextP ctx, Drawable draw, int x, int y, int width, int height)
+{
+ XRectangle xrect;
+ XserverRegion region;
+
+ xrect.x = x;
+ xrect.y = y;
+ xrect.width = width;
+ xrect.height = height;
+
+ region = XFixesCreateRegion(ctx->native_dpy, &xrect, 1);
+ XDamageAdd(ctx->native_dpy, draw, region);
+ XFixesDestroyRegion(ctx->native_dpy, region);
+ XFlush(ctx->native_dpy);
+}
VAStatus vaPutSurface (
VADisplay dpy,
VASurfaceID surface,
)
{
VADriverContextP ctx;
+ VAStatus status;
+ XRectangle rect;
if (fool_postp)
return VA_STATUS_SUCCESS;
destx, desty, destw, desth,
cliprects, number_cliprects, flags );
- return ctx->vtable->vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch,
+ status = ctx->vtable->vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch,
destx, desty, destw, desth,
cliprects, number_cliprects, flags );
+
+ va_report_damage(ctx, draw, destx, desty, destw, desth);
+
+ return status;
}