diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-07-28 01:41:39 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-07-28 01:47:41 (GMT) |
commit | cb52327b12aa6c25696101a63d44bc688c165f47 (patch) | |
tree | 3bc816f9b4ab38b6b33b46a6afbfdec394394c2d /src | |
parent | 3f6adc4a8071257c3a7211343b7591a1c32d73bd (diff) | |
download | Qt-cb52327b12aa6c25696101a63d44bc688c165f47.zip Qt-cb52327b12aa6c25696101a63d44bc688c165f47.tar.gz Qt-cb52327b12aa6c25696101a63d44bc688c165f47.tar.bz2 |
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')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 4b76ef6..642a386 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); } } |