Ignore:
Timestamp:
Apr 26, 2010, 2:41:21 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Use the fastest GPI matrix transformation for mirroring the image when drawing windows using the old GpiDrawBits() approach.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/painting/qwindowsurface_raster.cpp

    r698 r708  
    7474LONG APIENTRY GpiQueryYInversion(HPS hps);
    7575BOOL APIENTRY GpiEnableYInversion(HPS hps, LONG lHeight);
    76 #define QT_BITMAP_MIRROR 1  // 1 = QImage.mirrored()
     76#define QT_BITMAP_MIRROR   // 1 = QImage.mirrored()
    7777                            // 2 = GpiEnableYInversion()
    78                             // 3 = GPI Matrix
     78                            // 3 = GPI Matrix
    7979#endif
    8080
     
    261261#elif QT_BITMAP_MIRROR == 2
    262262
     263
     264
     265
     266
    263267    br.translate(offset);
    264268
     
    307311#elif QT_BITMAP_MIRROR == 3
    308312
    309     // use the reflection + transformation matrix to flip the y axis.
    310     // This should be slower than flipping the image ourselves (unless this
    311     // particular matrix is recognized by the driver which then enters some
    312     // special mode that doesn't require any flipping at all but uses the
    313     // image as is) hence disabled for now.
    314     // @todo check if it's really slower than flipping the image bits instead
    315     // @todo I guess we can use DIVE here; check it too
     313    // Use the reflection + transformation matrix to flip the y axis.
     314    // This is proven to be much faster than manual image flipping on the real
     315    // video hardware as it probably involves some hardware acceleration in
     316    // the video driver.
     317
    316318    MATRIXLF m;
    317319    m.fxM11 = MAKEFIXED(1, 0);
Note: See TracChangeset for help on using the changeset viewer.