Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp

    r561 r651  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    471471
    472472    QDirectFBPixmapData *data = new QDirectFBPixmapData(screen, QPixmapData::PixmapType);
     473    data->setSerialNumber(++global_ser_no);
    473474    DFBSurfaceBlittingFlags flags = DSBLIT_NOFX;
    474475    data->alpha = alpha;
     
    552553}
    553554
     555
     556bool 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
    554583void QDirectFBPixmapData::invalidate()
    555584{
     
    568597
    569598#endif // QT_NO_QWS_DIRECTFB
    570 
    571 
    572 
Note: See TracChangeset for help on using the changeset viewer.