glamor: Prepare/finish access once if src equal to dst.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
cbedfe7513
commit
4afa9e4080
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user