summaryrefslogtreecommitdiff
path: root/src/uxa
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>2011-01-26 08:08:33 -0500
commit38cf1ae55006125cf502199b9fb3a4f75f4b009f (patch)
tree1a9b08382073fa29f32dae3832e6c8a8d5d399b2 /src/uxa
parent8f05e9149da590f4374557e8a41e8b9e35fa007f (diff)
Tighten damage region for fill rect
Diffstat (limited to 'src/uxa')
-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