Changeset 769 for trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
r651 r769 922 922 } 923 923 } else { 924 flipFlags = DSFLIP_BLIT ;924 flipFlags = DSFLIP_BLIT|DSFLIP_ONSYNC; 925 925 } 926 926 } … … 1127 1127 if (displayArgs.contains(QLatin1String("boundingrectflip"), Qt::CaseInsensitive)) { 1128 1128 d_ptr->directFBFlags |= BoundingRectFlip; 1129 } else if (displayArgs.contains(QLatin1String("nopartialflip"), Qt::CaseInsensitive)) { 1130 d_ptr->directFBFlags |= NoPartialFlip; 1129 1131 } 1130 1132 … … 1139 1141 #endif 1140 1142 d_ptr->dfb->SetCooperativeLevel(d_ptr->dfb, DFSCL_FULLSCREEN); 1143 1144 const bool forcePremultiplied = displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive); 1141 1145 1142 1146 DFBSurfaceDescription description; … … 1168 1172 } 1169 1173 1170 if ( displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive)) {1174 if (forcePremultiplied) { 1171 1175 description.caps |= DSCAPS_PREMULTIPLIED; 1172 1176 } … … 1218 1222 break; 1219 1223 case QImage::Format_ARGB32: 1224 if (forcePremultiplied) 1225 d_ptr->alphaPixmapFormat = pixelFormat = QImage::Format_ARGB32_Premultiplied; 1220 1226 case QImage::Format_ARGB32_Premultiplied: 1221 1227 case QImage::Format_ARGB4444_Premultiplied: … … 1675 1681 uchar *QDirectFBScreen::lockSurface(IDirectFBSurface *surface, DFBSurfaceLockFlags flags, int *bpl) 1676 1682 { 1677 void *mem ;1683 void *mem = 0; 1678 1684 const DFBResult result = surface->Lock(surface, flags, &mem, bpl); 1679 1685 if (result != DFB_OK) { … … 1684 1690 } 1685 1691 1692 static inline bool isFullUpdate(IDirectFBSurface *surface, const QRegion ®ion, const QPoint &offset) 1693 { 1694 if (offset == QPoint(0, 0) && region.rectCount() == 1) { 1695 QSize size; 1696 surface->GetSize(surface, &size.rwidth(), &size.rheight()); 1697 if (region.boundingRect().size() == size) 1698 return true; 1699 } 1700 return false; 1701 } 1686 1702 1687 1703 void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, 1688 1704 const QRegion ®ion, const QPoint &offset) 1689 1705 { 1690 if (!(flipFlags & DSFLIP_BLIT)) { 1706 if (d_ptr->directFBFlags & NoPartialFlip 1707 || (!(flipFlags & DSFLIP_BLIT) && QT_PREPEND_NAMESPACE(isFullUpdate(surface, region, offset)))) { 1691 1708 surface->Flip(surface, 0, flipFlags); 1692 1709 } else {
Note:
See TracChangeset
for help on using the changeset viewer.