summaryrefslogtreecommitdiff
path: root/src/plugins/gfxdrivers
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-07-27 18:41:39 -0700
committerAnders Bakken <anders.bakken@nokia.com>2009-07-27 18:47:41 -0700
commitcb52327b12aa6c25696101a63d44bc688c165f47 (patch)
tree3bc816f9b4ab38b6b33b46a6afbfdec394394c2d /src/plugins/gfxdrivers
parent3f6adc4a8071257c3a7211343b7591a1c32d73bd (diff)
downloadqt4-tools-cb52327b12aa6c25696101a63d44bc688c165f47.tar.gz
Fix off-by-one bug in QDirectFBScreen::flipSurface
DFBRegions are exactly like QRects it turns out. x2/y2 == QRect::right()/QRect::bottom() This means I actually can reinterpret_cast QRect to DFBRegions but it's not really worth it. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 4b76ef6c3f..642a38639a 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1330,15 +1330,15 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags
for (int i=0; i<rects.size(); ++i) {
const QRect &r = rects.at(i);
const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(),
- r.x() + r.width() + offset.x(),
- r.y() + r.height() + offset.y() };
+ r.right() + offset.x(),
+ r.bottom() + offset.y() };
surface->Flip(surface, &dfbReg, i + 1 < rects.size() ? nonWaitFlags : flipFlags);
}
} else {
const QRect r = region.boundingRect();
const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(),
- r.x() + r.width() + offset.x(),
- r.y() + r.height() + offset.y() };
+ r.right() + offset.x(),
+ r.bottom() + offset.y() };
surface->Flip(surface, &dfbReg, flipFlags);
}
}