Commit 4afa9e40 authored by Zhigang Gong's avatar Zhigang Gong
Browse files

glamor: Prepare/finish access once if src equal to dst.


Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent cbedfe75
......@@ -322,6 +322,7 @@ glamor_copy_n_to_n(DrawablePtr src,
goto done;
return;
}
glamor_report_delayed_fallbacks(src->pScreen);
glamor_report_delayed_fallbacks(dst->pScreen);
......@@ -329,11 +330,12 @@ glamor_copy_n_to_n(DrawablePtr src,
glamor_get_drawable_location(src),
glamor_get_drawable_location(dst));
if (glamor_prepare_access(dst, GLAMOR_ACCESS_RW)) {
if (glamor_prepare_access(src, GLAMOR_ACCESS_RO)) {
if (dst == src || glamor_prepare_access(src, GLAMOR_ACCESS_RO)) {
fbCopyNtoN(src, dst, gc, box, nbox,
dx, dy, reverse, upsidedown, bitplane,
closure);
glamor_finish_access(src);
if (dst != src)
glamor_finish_access(src);
}
glamor_finish_access(dst);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment