diff options
author | Søren Sandmann <ssp@redhat.com> | 2010-06-22 00:26:46 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-01-26 08:08:33 -0500 |
commit | 38cf1ae55006125cf502199b9fb3a4f75f4b009f (patch) | |
tree | 1a9b08382073fa29f32dae3832e6c8a8d5d399b2 /src/uxa | |
parent | 8f05e9149da590f4374557e8a41e8b9e35fa007f (diff) |
Tighten damage region for fill rect
Diffstat (limited to 'src/uxa')
-rw-r--r-- | src/uxa/uxa-unaccel.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/uxa/uxa-unaccel.c b/src/uxa/uxa-unaccel.c index f980e94..84e9d8b 100644 --- a/src/uxa/uxa-unaccel.c +++ b/src/uxa/uxa-unaccel.c @@ -127,12 +127,18 @@ uxa_check_copy_area(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, { ScreenPtr screen = pSrc->pScreen; RegionPtr ret = NULL; + RegionRec region; + + /* FIXME: Hmm, it's not totally clear what to do in this case. In fact, + * all cases where more than one drawable can get prepare_access() called + * on it multiple times is kinda bad. + */ UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, uxa_drawable_location(pSrc), uxa_drawable_location(pDst))); - if (uxa_prepare_access(pDst, NULL, UXA_ACCESS_RW)) { - if (uxa_prepare_access(pSrc, NULL, UXA_ACCESS_RO)) { + if (uxa_prepare_access(pDst, ®ion, UXA_ACCESS_RW)) { + if (uxa_prepare_access(pSrc, ®ion, UXA_ACCESS_RO)) { ret = fbCopyArea(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); @@ -260,17 +266,23 @@ uxa_check_poly_fill_rect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle * prect) { ScreenPtr screen = pDrawable->pScreen; + RegionRec region; + REGION_INIT (screen, ®ion, (BoxPtr)NULL, 0); + uxa_damage_poly_fill_rect (®ion, pDrawable, pGC, nrect, prect); + UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable))); - if (uxa_prepare_access(pDrawable, NULL, UXA_ACCESS_RW)) { + if (uxa_prepare_access(pDrawable, ®ion, UXA_ACCESS_RW)) { if (uxa_prepare_access_gc(pGC)) { fbPolyFillRect(pDrawable, pGC, nrect, prect); uxa_finish_access_gc(pGC); } uxa_finish_access(pDrawable); } + + REGION_UNINIT (screen, ®ion); } void |