equal
deleted
inserted
replaced
550 Q_ASSERT(lockFlgs); |
550 Q_ASSERT(lockFlgs); |
551 Q_ASSERT(!lockedImage.isNull()); |
551 Q_ASSERT(!lockedImage.isNull()); |
552 return &lockedImage; |
552 return &lockedImage; |
553 } |
553 } |
554 |
554 |
|
555 |
|
556 bool QDirectFBPixmapData::scroll(int dx, int dy, const QRect &rect) |
|
557 { |
|
558 if (!dfbSurface) { |
|
559 return false; |
|
560 } |
|
561 unlockSurface(); |
|
562 DFBResult result = dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); |
|
563 if (result != DFB_OK) { |
|
564 DirectFBError("QDirectFBPixmapData::scroll", result); |
|
565 return false; |
|
566 } |
|
567 result = dfbSurface->SetPorterDuff(dfbSurface, DSPD_NONE); |
|
568 if (result != DFB_OK) { |
|
569 DirectFBError("QDirectFBPixmapData::scroll", result); |
|
570 return false; |
|
571 } |
|
572 |
|
573 const DFBRectangle source = { rect.x(), rect.y(), rect.width(), rect.height() }; |
|
574 result = dfbSurface->Blit(dfbSurface, dfbSurface, &source, source.x + dx, source.y + dy); |
|
575 if (result != DFB_OK) { |
|
576 DirectFBError("QDirectFBPixmapData::scroll", result); |
|
577 return false; |
|
578 } |
|
579 |
|
580 return true; |
|
581 } |
|
582 |
555 void QDirectFBPixmapData::invalidate() |
583 void QDirectFBPixmapData::invalidate() |
556 { |
584 { |
557 if (dfbSurface) { |
585 if (dfbSurface) { |
558 screen->releaseDFBSurface(dfbSurface); |
586 screen->releaseDFBSurface(dfbSurface); |
559 dfbSurface = 0; |
587 dfbSurface = 0; |
566 } |
594 } |
567 |
595 |
568 QT_END_NAMESPACE |
596 QT_END_NAMESPACE |
569 |
597 |
570 #endif // QT_NO_QWS_DIRECTFB |
598 #endif // QT_NO_QWS_DIRECTFB |
571 |
|
572 |
|
573 |
|