If GLAMOR is enabled, we route UXA's fillspans and
polyfillrects to glamor by default. And if glamor
fail to accelerate it, UXA continue to handle it.

Reviewed-by: Eugeni Dodonov <eugeni.dodo...@intel.com>
Signed-off-by: Zhigang Gong <zhigang.g...@linux.intel.com>
---
 uxa/uxa-accel.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 516834f..18fa63b 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -27,7 +27,6 @@
  *    Michel Dänzer <mic...@tungstengraphics.com>
  *
  */
-
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
 #endif
@@ -37,6 +36,10 @@
 #include "uxa.h"
 #include "mipict.h"
 
+#ifdef GLAMOR
+#include "glamor.h"
+#endif
+
 static void
 uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
               DDXPointPtr ppt, int *pwidth, int fSorted)
@@ -49,6 +52,10 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
        int nbox;
        int x1, x2, y;
        int off_x, off_y;
+#ifdef GLAMOR
+       if (glamor_fill_spans_nf(pDrawable, pGC, n, ppt, pwidth, fSorted))
+               return;
+#endif
 
        if (uxa_screen->swappedOut || uxa_screen->force_fallback)
                goto fallback;
@@ -673,6 +680,10 @@ uxa_poly_fill_rect(DrawablePtr pDrawable,
        int n;
        RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
 
+#ifdef GLAMOR
+       if (glamor_poly_fill_rect_nf(pDrawable, pGC, nrect, prect))
+               return;
+#endif
        /* Compute intersection of rects and clip region */
        REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
        REGION_INTERSECT(pScreen, pReg, pClip, pReg);
-- 
1.7.4.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to