diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-06 21:20:15 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-12 15:53:06 +0800 |
commit | 33eace9c5c5bcc92c64a55cd6278971a6dddd6ef (patch) | |
tree | 2ec027ce6fea0cbec98acec20646696449d4420a /src/glamor_polyops.c | |
parent | a69bb6ae042a536cc3902f234f9bae685bc64520 (diff) |
glyphblt/polyops: Use miFunctions by default.
Calling to miFunctions give some opportunities to jump to
accelerated path, so we switch to call miFunctions rather
than fallback to fbFunctions directly.
Diffstat (limited to 'src/glamor_polyops.c')
-rw-r--r-- | src/glamor_polyops.c | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/src/glamor_polyops.c b/src/glamor_polyops.c index 7320c17..5930178 100644 --- a/src/glamor_polyops.c +++ b/src/glamor_polyops.c @@ -37,11 +37,8 @@ _glamor_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, && glamor_ddx_fallback_check_pixmap(pDrawable)) return FALSE; - glamor_prepare_access_gc(pGC); - glamor_prepare_access(pDrawable, GLAMOR_ACCESS_RW); - fbPolyPoint(pDrawable, pGC, mode, npt, ppt); - glamor_finish_access(pDrawable, GLAMOR_ACCESS_RW); - glamor_finish_access_gc(pGC); + miPolyPoint(pDrawable, pGC, mode, npt, ppt); + return TRUE; } @@ -68,15 +65,7 @@ _glamor_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, && glamor_ddx_fallback_check_pixmap(pDrawable)) return FALSE; - /* For lineWidth is not zero, fb calls to mi functions. */ - if (pGC->lineWidth == 0) { - glamor_prepare_access_gc(pGC); - glamor_prepare_access(pDrawable, GLAMOR_ACCESS_RW); - fbPolySegment(pDrawable, pGC, nseg, pSeg); - glamor_finish_access(pDrawable, GLAMOR_ACCESS_RW); - glamor_finish_access_gc(pGC); - } else - fbPolySegment(pDrawable, pGC, nseg, pSeg); + miPolySegment(pDrawable, pGC, nseg, pSeg); return TRUE; } @@ -94,40 +83,3 @@ glamor_poly_segment_nf(DrawablePtr pDrawable, GCPtr pGC, int nseg, { return _glamor_poly_segment(pDrawable, pGC, nseg, pSeg, FALSE); } - -static Bool -_glamor_poly_line(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, - DDXPointPtr ppt, Bool fallback) -{ - if (!fallback - && glamor_ddx_fallback_check_gc(pGC) - && glamor_ddx_fallback_check_pixmap(pDrawable)) - return FALSE; - /* For lineWidth is not zero, fb calls to mi functions. */ - - if (pGC->lineWidth == 0) { - glamor_prepare_access_gc(pGC); - glamor_prepare_access(pDrawable, GLAMOR_ACCESS_RW); - fbPolyLine(pDrawable, pGC, mode, npt, ppt); - glamor_finish_access(pDrawable, GLAMOR_ACCESS_RW); - glamor_finish_access_gc(pGC); - } else - fbPolyLine(pDrawable, pGC, mode, npt, ppt); - - return TRUE; -} - -void -glamor_poly_line(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, - DDXPointPtr ppt) -{ - _glamor_poly_line(pDrawable, pGC, mode, npt, ppt, TRUE); -} - -Bool -glamor_poly_line_nf(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, - DDXPointPtr ppt) -{ - return _glamor_poly_line(pDrawable, pGC, mode, npt, ppt, FALSE); -} - |