summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-19 17:21:26 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-19 20:11:08 +0000
commit9b6ade12346efa5b9cc095ad44c7d71880a19ab0 (patch)
treeffbebdc5e32f630b5ec6b077342af635652fb4c5
parenteeb81dd6b4651c6b3e8676007d37480888726efa (diff)
sna: Create a GPU bo for accelerated core drawing
As we now can accelerate most of the common core drawing operations, we can create GPU bo for accelerated drawing on first use without undue fear of readbacks. This benefits Qt especially which heavily uses core the drawing operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 59788119..a88257fa 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1032,6 +1032,11 @@ _sna_drawable_use_gpu_bo(DrawablePtr drawable,
if (priv == NULL)
return FALSE;
+
+ if (pixmap->devPrivate.ptr == NULL &&
+ !sna_pixmap_move_to_gpu(pixmap))
+ return FALSE;
+
if (priv->gpu_bo == NULL)
return FALSE;