Changeset 56057 in vbox
- Timestamp:
- May 25, 2015 1:33:44 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r55834 r56057 57 57 #include <VBox/VBoxVideo3D.h> 58 58 59 /* Other includes: */ 60 #include <math.h> 61 59 62 #ifdef Q_WS_X11 60 63 /* X11 includes: */ … … 290 293 void paintSeamless(QPaintEvent *pEvent); 291 294 292 /** Returns the transformation mode corresponding to the passed ScalingOptimizationType. */293 static Qt::TransformationMode transformationMode( ScalingOptimizationType type);295 /** Returns the transformation mode corresponding to the passed @a dScaleFactor and ScalingOptimizationType. */ 296 static Qt::TransformationMode transformationMode(double dScaleFactor, ScalingOptimizationType type); 294 297 295 298 /** Erases corresponding @a rect with @a painter. */ … … 1343 1346 /* And scaling the image to predefined scaled-factor: */ 1344 1347 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1345 transformationMode( scalingOptimizationType()));1348 transformationMode(m_dScaleFactor, scalingOptimizationType())); 1346 1349 } 1347 1350 /* Finally we are choosing image to paint from: */ … … 1384 1387 /* And scaling the image to predefined scaled-factor: */ 1385 1388 scaledImage = scaledImage.scaled(m_scaledSize, Qt::IgnoreAspectRatio, 1386 transformationMode( scalingOptimizationType()));1389 transformationMode(m_dScaleFactor, scalingOptimizationType())); 1387 1390 } 1388 1391 /* Finally we are choosing image to paint from: */ … … 1440 1443 1441 1444 /* static */ 1442 Qt::TransformationMode UIFrameBufferPrivate::transformationMode( ScalingOptimizationType type)1445 Qt::TransformationMode UIFrameBufferPrivate::transformationMode(double dScaleFactor, ScalingOptimizationType type) 1443 1446 { 1444 1447 switch (type) 1445 1448 { 1449 /* Check if optimization type is forced to be 'Performance': */ 1446 1450 case ScalingOptimizationType_Performance: return Qt::FastTransformation; 1447 1451 default: break; 1448 1452 } 1449 return Qt::SmoothTransformation; 1453 /* For integer-scaling we are choosing the 'Performance' optimization type ourselves: */ 1454 return floor(dScaleFactor) == dScaleFactor ? Qt::FastTransformation : Qt::SmoothTransformation; 1450 1455 } 1451 1456
Note:
See TracChangeset
for help on using the changeset viewer.