From cb52327b12aa6c25696101a63d44bc688c165f47 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 27 Jul 2009 18:41:39 -0700 Subject: 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 --- src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 8 ++++---- 1 file 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; iFlip(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); } } -- cgit v0.12