diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2010-02-19 09:21:40 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2010-02-24 22:17:00 (GMT) |
commit | dda020241665f895ff4587ca6a08b7bf65c046bf (patch) | |
tree | f3d003bd53bda82a0bf0619b6fd3ce746066be0d /src | |
parent | bc773d465d57e20b96f9c6f55397d4014e07bc24 (diff) | |
download | Qt-dda020241665f895ff4587ca6a08b7bf65c046bf.zip Qt-dda020241665f895ff4587ca6a08b7bf65c046bf.tar.gz Qt-dda020241665f895ff4587ca6a08b7bf65c046bf.tar.bz2 |
Force DSFLIP_BLIT unless it's a full flip in DFB
If you're only updating parts of a widget we have to make sure
DSFLIP_BLIT is included. Otherwise Qt's assumptions about the backing
store breaks.
Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 8f37bcf..ff997c0 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1689,11 +1689,22 @@ uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFla return reinterpret_cast<uchar*>(mem); } +static inline bool isFullUpdate(IDirectFBSurface *surface, const QRegion ®ion, const QPoint &offset) +{ + if (offset == QPoint(0, 0) && region.rectCount() == 1) { + QSize size; + surface->GetSize(surface, &size.rwidth(), &size.rheight()); + if (region.boundingRect().size() == size) + return true; + } + return false; +} void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, const QRegion ®ion, const QPoint &offset) { - if (!(flipFlags & DSFLIP_BLIT) || d_ptr->directFBFlags & NoPartialFlip) { + if (d_ptr->directFBFlags & NoPartialFlip + || (!(flipFlags & DSFLIP_BLIT) && QT_PREPEND_NAMESPACE(isFullUpdate(surface, region, offset)))) { surface->Flip(surface, 0, flipFlags); } else { if (!(d_ptr->directFBFlags & BoundingRectFlip) && region.rectCount() > 1) { |