summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-09-17 22:17:16 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-09-17 22:28:51 (GMT)
commit215d7c9a57ae531982ec98a5de0ad01589151469 (patch)
tree84b0caa149cb12458cc91153c40b71c32a853145 /src/plugins
parent3ec54c15f37c8f74fc86486abf67697eb1f5cded (diff)
downloadQt-215d7c9a57ae531982ec98a5de0ad01589151469.zip
Qt-215d7c9a57ae531982ec98a5de0ad01589151469.tar.gz
Qt-215d7c9a57ae531982ec98a5de0ad01589151469.tar.bz2
Fix a bug in QDirectFBWindowSurface::scroll
It seems that one cannot do multiple blits within a double-buffered surface in overlapping one another without doing a Flip in between. I find this a little odd and will check that it's the correct behavior but this fixes bugs in scroll(). To see a case that used to produce drawing errors check out the collidingmouse example and drag the viewport around. Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 4cebc96..19103cb 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -274,6 +274,8 @@ static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int
{
const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy);
+ const DFBRegion region = { rect.x + dx, rect.y + dy, r.right() + dx, r.bottom() + dy };
+ surface->Flip(surface, &region, DSFLIP_BLIT);
}
bool QDirectFBWindowSurface::scroll(const QRegion &region, int dx, int dy)