mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
Call glamor_create_pixmap directly in glamor rendering path.
When glamor is rendering pixmaps, and needs to create some temporary pixmap, it's better to use glamor version create pixmap directly. As if goes to external DDX's create pixmap, it may create a external DRM buffer which is not necessary. All the case within glamor scope is to create a texture only pixmap or a in memory pixmap. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
10ad332ded
commit
36d424feae
8 changed files with 41 additions and 42 deletions
|
|
@ -360,13 +360,13 @@ _glamor_copy_n_to_n(DrawablePtr src,
|
|||
src_pixmap->drawable.width *
|
||||
src_pixmap->drawable.height))) {
|
||||
|
||||
temp_pixmap = (*screen->CreatePixmap) (screen,
|
||||
bound.x2 - bound.x1,
|
||||
bound.y2 - bound.y1,
|
||||
src_pixmap->
|
||||
drawable.depth,
|
||||
overlaped ? 0 :
|
||||
GLAMOR_CREATE_PIXMAP_CPU);
|
||||
temp_pixmap = glamor_create_pixmap(screen,
|
||||
bound.x2 - bound.x1,
|
||||
bound.y2 - bound.y1,
|
||||
src_pixmap->
|
||||
drawable.depth,
|
||||
overlaped ? 0 :
|
||||
GLAMOR_CREATE_PIXMAP_CPU);
|
||||
if (!temp_pixmap)
|
||||
goto fail;
|
||||
glamor_transform_boxes(box, nbox, -bound.x1, -bound.y1);
|
||||
|
|
@ -430,9 +430,8 @@ _glamor_copy_n_to_n(DrawablePtr src,
|
|||
done:
|
||||
glamor_clear_delayed_fallbacks(src->pScreen);
|
||||
glamor_clear_delayed_fallbacks(dst->pScreen);
|
||||
if (temp_src != src) {
|
||||
(*screen->DestroyPixmap) (temp_pixmap);
|
||||
}
|
||||
if (temp_src != src)
|
||||
glamor_destroy_pixmap(temp_pixmap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue