i830: Use set_pixmap_bo() instead of open-coding.
The advantage is that this enables in-flight reuse of the old pixmap if possible. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
ad8af95dd3
commit
5b7efe375a
|
|
@ -741,18 +741,12 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
|
|||
if (tiling != I915_TILING_NONE)
|
||||
drm_intel_bo_set_tiling(bo, &tiling, stride);
|
||||
|
||||
dri_bo_unreference(priv->bo);
|
||||
priv->bo = bo;
|
||||
priv->tiling = tiling;
|
||||
priv->stride = stride;
|
||||
priv->batch_read_domains = priv->batch_write_domain = 0;
|
||||
priv->flush_read_domains = priv->flush_write_domain = 0;
|
||||
list_del(&priv->batch);
|
||||
list_del(&priv->flush);
|
||||
pixmap->drawable.pScreen->ModifyPixmapHeader(pixmap,
|
||||
w, h,
|
||||
0, 0,
|
||||
stride, NULL);
|
||||
i830_set_pixmap_bo(pixmap, bo);
|
||||
dri_bo_unreference(bo);
|
||||
} else {
|
||||
bo = priv->bo;
|
||||
stride = i830_pixmap_pitch(pixmap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue