VirtualBox

Changeset 53518 in vbox


Ignore:
Timestamp:
Dec 12, 2014 10:33:35 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Support for scaled video-output: Seamless mode: Call for coordinate-system update on backing-scale-factor changes and Retina reflection policy changes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

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

    r53517 r53518  
    479479    }
    480480    /* Tune according scale-factor: */
    481     if (m_dScaleFactor != 1.0)
     481    if (m_dScaleFactor != 1.0 || backingScaleFactor() > 1.0)
    482482        region = m_transform.map(region);
    483483
     
    766766#endif /* VBOX_WITH_VIDEOHWACCEL */
    767767
     768void UIFrameBuffer::setBackingScaleFactor(double dBackingScaleFactor)
     769{
     770    /* Remember new backing-scale-factor: */
     771    m_dBackingScaleFactor = dBackingScaleFactor;
     772
     773    /* Update coordinate-system: */
     774    updateCoordinateSystem();
     775}
     776
    768777void UIFrameBuffer::sltHandleScaleFactorChange(const QString &strMachineID)
    769778{
     
    788797    /* Fetch new unscaled HiDPI output mode value: */
    789798    m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid());
     799
     800    /* Update coordinate-system: */
     801    updateCoordinateSystem();
    790802}
    791803#endif /* RT_OS_DARWIN */
     
    845857    if (m_dScaleFactor != 1.0)
    846858        m_transform = m_transform.scale(m_dScaleFactor, m_dScaleFactor);
     859
     860    /* Apply the backing-scale-factor if necessary: */
     861    if (useUnscaledHiDPIOutput() && backingScaleFactor() > 1.0)
     862        m_transform = m_transform.scale(1.0 / backingScaleFactor(), 1.0 / backingScaleFactor());
    847863}
    848864
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r53517 r53518  
    225225    double backingScaleFactor() const { return m_dBackingScaleFactor; }
    226226    /** Define backing scale factor used by HiDPI frame-buffer. */
    227     void setBackingScaleFactor(double dBackingScaleFactor) { m_dBackingScaleFactor = dBackingScaleFactor; }
     227    void setBackingScaleFactor(double dBackingScaleFactor);
    228228
    229229protected slots:
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