st/xorg: Miscellaneous XVideo fixes.
* Make sure the destination pixmap has a texture to render into. * Fix damage reporting so the EXA migration code can do the right thing. * Fix destination coordinates for redirected windows.
This commit is contained in:
parent
34145fc3b7
commit
10c67f9381
|
@ -446,6 +446,11 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap);
|
struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap);
|
||||||
|
|
||||||
|
if (!dst->tex) {
|
||||||
|
xorg_exa_set_shared_usage(pPixmap);
|
||||||
|
pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (!dst || !dst->tex)
|
if (!dst || !dst->tex)
|
||||||
XORG_FALLBACK("Xv destination %s", !dst ? "!dst" : "!dst->tex");
|
XORG_FALLBACK("Xv destination %s", !dst ? "!dst" : "!dst->tex");
|
||||||
|
|
||||||
|
@ -469,6 +474,9 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
|
||||||
setup_vs_video_constants(pPriv->r, dst);
|
setup_vs_video_constants(pPriv->r, dst);
|
||||||
setup_fs_video_constants(pPriv->r, hdtv);
|
setup_fs_video_constants(pPriv->r, hdtv);
|
||||||
|
|
||||||
|
exaMoveInPixmap(pPixmap);
|
||||||
|
DamageDamageRegion(&pPixmap->drawable, dstRegion);
|
||||||
|
|
||||||
while (nbox--) {
|
while (nbox--) {
|
||||||
int box_x1 = pbox->x1;
|
int box_x1 = pbox->x1;
|
||||||
int box_y1 = pbox->y1;
|
int box_y1 = pbox->y1;
|
||||||
|
@ -476,8 +484,8 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
|
||||||
int box_y2 = pbox->y2;
|
int box_y2 = pbox->y2;
|
||||||
float diff_x = (float)src_w / (float)dst_w;
|
float diff_x = (float)src_w / (float)dst_w;
|
||||||
float diff_y = (float)src_h / (float)dst_h;
|
float diff_y = (float)src_h / (float)dst_h;
|
||||||
int offset_x = box_x1 - dstX;
|
int offset_x = box_x1 - dstX + pPixmap->screen_x;
|
||||||
int offset_y = box_y1 - dstY;
|
int offset_y = box_y1 - dstY + pPixmap->screen_y;
|
||||||
int offset_w;
|
int offset_w;
|
||||||
int offset_h;
|
int offset_h;
|
||||||
|
|
||||||
|
@ -495,7 +503,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
|
||||||
|
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
DamageDamageRegion(&pPixmap->drawable, dstRegion);
|
DamageRegionProcessPending(&pPixmap->drawable);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue