Changeset 71030 in vbox
- Timestamp:
- Feb 15, 2018 3:34:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r70870 r71030 1351 1351 /* Scaled image is NULL by default: */ 1352 1352 QImage scaledImage; 1353 /* But if scale d-factor is set and current image is NOT null: */1353 /* But if scale-factor is set and current image is NOT null: */ 1354 1354 if (m_scaledSize.isValid() && !m_image.isNull()) 1355 1355 { … … 1357 1357 * detached during scale process, otherwise we can get a frozen frame-buffer. */ 1358 1358 scaledImage = m_image.copy(); 1359 /* And scaling the image to predefined scale d-factor: */1359 /* And scaling the image to predefined scale-factor: */ 1360 1360 switch (m_pMachineView->visualStateType()) 1361 1361 { … … 1392 1392 1393 1393 #ifdef VBOX_WS_MAC 1394 /* On OSX for Qt5 we need to erase backing store first: */ 1395 QRect eraseRect = paintRect; 1396 /* Take the device-pixel-ratio into account: */ 1397 if (useUnscaledHiDPIOutput() && devicePixelRatio() > 1.0) 1398 { 1399 eraseRect.moveTo(eraseRect.topLeft() / devicePixelRatio()); 1400 eraseRect.setSize(eraseRect.size() / devicePixelRatio()); 1401 } 1402 /* Replace translucent background with black one: */ 1394 /* On OSX for Qt5 we need to fill the backing store first: */ 1403 1395 painter.setCompositionMode(QPainter::CompositionMode_Source); 1404 painter.fillRect( eraseRect, QColor(Qt::black));1396 painter.fillRect(pEvent->rect(), QColor(Qt::black)); 1405 1397 painter.setCompositionMode(QPainter::CompositionMode_SourceAtop); 1406 1398 #endif /* VBOX_WS_MAC */ … … 1420 1412 /* Scaled image is NULL by default: */ 1421 1413 QImage scaledImage; 1422 /* But if scale d-factor is set and current image is NOT null: */1414 /* But if scale-factor is set and current image is NOT null: */ 1423 1415 if (m_scaledSize.isValid() && !m_image.isNull()) 1424 1416 { … … 1426 1418 * detached during scale process, otherwise we can get a frozen frame-buffer. */ 1427 1419 scaledImage = m_image.copy(); 1428 /* And scaling the image to predefined scale d-factor: */1420 /* And scaling the image to predefined scale-factor: */ 1429 1421 switch (m_pMachineView->visualStateType()) 1430 1422 { … … 1483 1475 painter.setCompositionMode(QPainter::CompositionMode_SourceOver); 1484 1476 1485 #if defined(VBOX_WITH_TRANSLUCENT_SEAMLESS) 1486 /* On OSX for Qt5 we need to erase backing store first: */ 1487 QRect eraseRect = paintRect; 1488 /* Take the device-pixel-ratio into account: */ 1489 if (useUnscaledHiDPIOutput() && devicePixelRatio() > 1.0) 1490 { 1491 eraseRect.moveTo(eraseRect.topLeft() / devicePixelRatio()); 1492 eraseRect.setSize(eraseRect.size() / devicePixelRatio()); 1493 } 1494 /* Replace translucent background with black one: */ 1477 #ifdef VBOX_WITH_TRANSLUCENT_SEAMLESS 1478 /* In case of translucent seamless for Qt5 we need to fill the backing store first: */ 1495 1479 painter.setCompositionMode(QPainter::CompositionMode_Source); 1496 painter.fillRect( eraseRect, QColor(Qt::black));1480 painter.fillRect(pEvent->rect(), QColor(Qt::black)); 1497 1481 painter.setCompositionMode(QPainter::CompositionMode_SourceAtop); 1498 1482 #endif /* VBOX_WITH_TRANSLUCENT_SEAMLESS */
Note:
See TracChangeset
for help on using the changeset viewer.