summaryrefslogtreecommitdiff
path: root/glamor/glamor_polylines.c
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2011-12-12 06:56:36 +0800
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:46 -0800
commit36d424feaeec765d131c015df77d24db1a36fc38 (patch)
tree706261f473c671c976d52b3bf24b87a6c0f0d72e /glamor/glamor_polylines.c
parent10ad332dedad2df13212dcd198d947a2f5c76862 (diff)
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>
Diffstat (limited to 'glamor/glamor_polylines.c')
-rw-r--r--glamor/glamor_polylines.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/glamor/glamor_polylines.c b/glamor/glamor_polylines.c
index 2bb36c7e6..62401f5c3 100644
--- a/glamor/glamor_polylines.c
+++ b/glamor/glamor_polylines.c
@@ -122,10 +122,10 @@ glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n,
y_max = points[i].y;
}
- temp_pixmap = drawable->pScreen->CreatePixmap(drawable->pScreen,
- x_max - x_min + 1,
- y_max - y_min + 1,
- drawable->depth, 0);
+ temp_pixmap = glamor_create_pixmap(drawable->pScreen,
+ x_max - x_min + 1,
+ y_max - y_min + 1,
+ drawable->depth, 0);
if (temp_pixmap) {
temp_dest = &temp_pixmap->drawable;
temp_gc =
@@ -164,7 +164,7 @@ glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n,
0, 0,
x_max - x_min + 1,
y_max - y_min + 1, x_min, y_min);
- drawable->pScreen->DestroyPixmap(temp_pixmap);
+ glamor_destroy_pixmap(temp_pixmap);
for (i = 0; i < n; i++) {
points[i].x += x_min;
points[i].y += y_min;