diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-08-30 17:45:07 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-09-26 16:47:02 +0800 |
commit | 16659622708db82caaeb12527ba09545ad15b4c3 (patch) | |
tree | 8b5d0bc6269fdf52bb8a9b71174eddbeee544dfe /glamor/glamor_render.c | |
parent | bf4cbbd4e9c8ee104293a3c4eb202c880a139b73 (diff) |
glamor: Improve glyphs cache mechanism.
This commit applying the latest uxa's glyphs cache mechanism
and give up the old hash based cache algorithm. And the cache
picture now is much larger than the previous one also.
This new algorithm can avoid the hash insert/remove and also
the expensive sha1 checking. It could obtain about 10%
performance gain when rendering glyphs.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_render.c')
-rw-r--r-- | glamor/glamor_render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index bc6347883..258a09b9d 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -1405,7 +1405,7 @@ glamor_trapezoids(CARD8 op, void glamor_composite_rects(CARD8 op, - PicturePtr src, PicturePtr dst, + PicturePtr src, PicturePtr mask, PicturePtr dst, int nrect, glamor_composite_rect_t *rects) { int n; @@ -1414,7 +1414,7 @@ glamor_composite_rects(CARD8 op, ValidatePicture(src); ValidatePicture(dst); - if (glamor_composite_with_shader(op, src, NULL, dst, nrect, rects)) + if (glamor_composite_with_shader(op, src, mask, dst, nrect, rects)) return; n = nrect; @@ -1423,10 +1423,10 @@ glamor_composite_rects(CARD8 op, while (n--) { CompositePicture(op, src, - NULL, + mask, dst, r->x_src, r->y_src, - 0, 0, + r->x_mask, r->y_mask, r->x_dst, r->y_dst, r->width, r->height); r++; |