VirtualBox

Changeset 53522 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 12, 2014 11:09:56 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Frame-buffer: Some cleanup for painting routine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r53521 r53522  
    10371037                             image.bytesPerLine(), image.format());
    10381038
    1039 #ifndef QIMAGE_FRAMEBUFFER_WITH_DIRECT_OUTPUT
    10401039    /* Create sub-pixmap on the basis of sub-image above (1st copy involved): */
    10411040    QPixmap subPixmap = QPixmap::fromImage(subImage);
     
    10531052        }
    10541053
    1055 # ifdef Q_WS_MAC
    1056 #  ifdef VBOX_GUI_WITH_HIDPI
     1054#ifdef Q_WS_MAC
     1055# ifdef VBOX_GUI_WITH_HIDPI
    10571056        /* Should we
    10581057         * do not perform logical HiDPI scaling or
     
    10631062            subPixmap.setDevicePixelRatio(dBackingScaleFactor);
    10641063        }
    1065 #  endif /* VBOX_GUI_WITH_HIDPI */
    1066 # endif /* Q_WS_MAC */
     1064# endif /* VBOX_GUI_WITH_HIDPI */
     1065#endif /* Q_WS_MAC */
    10671066    }
    10681067
     
    10761075    /* Draw sub-pixmap: */
    10771076    painter.drawPixmap(paintPoint, subPixmap);
    1078 #else /* QIMAGE_FRAMEBUFFER_WITH_DIRECT_OUTPUT */
    1079     /* If HiDPI 'backing scale factor' defined: */
    1080     if (dBackingScaleFactor > 1.0)
    1081     {
    1082         /* Should we optimize HiDPI output for performance? */
    1083         if (hiDPIOptimizationType == HiDPIOptimizationType_Performance)
    1084         {
    1085             /* Create fast-scaled-sub-image (1st copy involved): */
    1086             QImage scaledSubImage = subImage.scaled(subImage.size() * dBackingScaleFactor,
    1087                                                     Qt::IgnoreAspectRatio, Qt::FastTransformation);
    1088 # ifdef Q_WS_MAC
    1089 #  ifdef VBOX_GUI_WITH_HIDPI
    1090             /* Mark sub-pixmap as HiDPI: */
    1091             scaledSubImage.setDevicePixelRatio(dBackingScaleFactor);
    1092 #  endif /* VBOX_GUI_WITH_HIDPI */
    1093 # endif /* Q_WS_MAC */
    1094             /* Directly draw scaled-sub-image: */
    1095             painter.drawImage(rect.x(), rect.y(), scaledSubImage);
    1096             return;
    1097         }
    1098     }
    1099     /* Directly draw sub-image: */
    1100     painter.drawImage(rect.x(), rect.y(), subImage);
    1101 #endif /* QIMAGE_FRAMEBUFFER_WITH_DIRECT_OUTPUT */
    1102 }
    1103 
     1077}
     1078
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette