summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2010-06-22 00:26:46 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-09-14 06:38:50 -0400
commit7641e2a8245f79dcf43c13fe14205d4856b27906 (patch)
tree1a9b08382073fa29f32dae3832e6c8a8d5d399b2
parentf2b53e64ce82e49334a6b193dfcf88e55b34b25d (diff)
Tighten damage region for fill rect
-rw-r--r--src/uxa/uxa-unaccel.c18
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, &region, UXA_ACCESS_RW)) {
+ if (uxa_prepare_access(pSrc, &region, 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, &region, (BoxPtr)NULL, 0);
+ uxa_damage_poly_fill_rect (&region, 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, &region, 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, &region);
}
void