Changeset 53522 in vbox for trunk/src/VBox
- Timestamp:
- Dec 12, 2014 11:09:56 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r53521 r53522 1037 1037 image.bytesPerLine(), image.format()); 1038 1038 1039 #ifndef QIMAGE_FRAMEBUFFER_WITH_DIRECT_OUTPUT1040 1039 /* Create sub-pixmap on the basis of sub-image above (1st copy involved): */ 1041 1040 QPixmap subPixmap = QPixmap::fromImage(subImage); … … 1053 1052 } 1054 1053 1055 # 1056 # 1054 #ifdef Q_WS_MAC 1055 # ifdef VBOX_GUI_WITH_HIDPI 1057 1056 /* Should we 1058 1057 * do not perform logical HiDPI scaling or … … 1063 1062 subPixmap.setDevicePixelRatio(dBackingScaleFactor); 1064 1063 } 1065 # 1066 # 1064 # endif /* VBOX_GUI_WITH_HIDPI */ 1065 #endif /* Q_WS_MAC */ 1067 1066 } 1068 1067 … … 1076 1075 /* Draw sub-pixmap: */ 1077 1076 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.