summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-09-04 16:42:14 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-09-04 16:42:14 (GMT)
commit3a18d6876f74ffbc415844fef5b1e49c083ded5d (patch)
treed98614d245e3130fdbd5e29ea3ae3289b712433e /src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
parent27745a63a8fec14e9ea99e3860b05da8be21a1ff (diff)
downloadQt-3a18d6876f74ffbc415844fef5b1e49c083ded5d.zip
Qt-3a18d6876f74ffbc415844fef5b1e49c083ded5d.tar.gz
Qt-3a18d6876f74ffbc415844fef5b1e49c083ded5d.tar.bz2
Remove unnecessary call to exposeRegion in DFB
If we make sure to erase the background to background color in connect() we don't have to do it in setGeometry. Also clean up the code in QDBWindowSurface::flush Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index e2b439e..b1ffe69 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -248,10 +248,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect)
updateFormat();
QWSWindowSurface::setGeometry(rect);
-#ifdef QT_NO_DIRECTFB_WM
- if (oldRect.isEmpty())
- screen->exposeRegion(screen->region(), 0);
-#endif
}
QByteArray QDirectFBWindowSurface::permanentState() const
@@ -357,15 +353,11 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
const QRect windowGeometry = QDirectFBWindowSurface::geometry();
#ifdef QT_NO_DIRECTFB_WM
if (mode == Offscreen) {
- QRegion r = region;
- r.translate(offset + windowGeometry.topLeft());
- screen->exposeRegion(r, 0);
- } else {
- screen->flipSurface(dfbSurface, flipFlags, region, offset);
- }
-#else
- screen->flipSurface(dfbSurface, flipFlags, region, offset);
+ screen->exposeRegion(region.translated(offset + geometry().topLeft()), 0);
+
+ } else
#endif
+ screen->flipSurface(dfbSurface, flipFlags, region, offset);
#ifdef QT_DIRECTFB_TIMING
enum { Secs = 3 };