VirtualBox

Changeset 53823 in vbox


Ignore:
Timestamp:
Jan 15, 2015 2:38:23 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97632
Message:

E/Qt: Mac OS X: 6278: Support for unscaled HiDPI (Retina) video-output: 2D Video Acceleration support.

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

Legend:

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

    r53803 r53823  
    4646
    4747# include <VBox/VBoxGL2D.h>
     48
     49#ifdef Q_WS_MAC
     50# include "VBoxUtils-darwin.h"
     51#endif /* Q_WS_MAC */
    4852
    4953#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     
    44304434    }
    44314435
     4436#ifdef Q_WS_MAC
     4437    /* Take the backing-scale-factor into account: */
     4438    if (mSizeInfo.useUnscaledHiDPIOutput())
     4439    {
     4440        const double dBackingScaleFactor = darwinBackingScaleFactor(mpViewport->window());
     4441        if (dBackingScaleFactor > 1.0)
     4442        {
     4443            rect.moveTo(rect.topLeft() / dBackingScaleFactor - QPoint(1, 1));
     4444            rect.setSize(rect.size() / dBackingScaleFactor + QSize(2, 2));
     4445        }
     4446    }
     4447#endif /* Q_WS_MAC */
     4448
    44324449    /* we do not to miss notify updates, because we have to update bg textures for it,
    44334450     * so no not check for m_fUnused here,
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h

    r53803 r53823  
    13461346        mPixelFormat(pFb->pixelFormat()), mVRAM(pFb->address()), mBitsPerPixel(pFb->bitsPerPixel()),
    13471347        mBytesPerLine(pFb->bytesPerLine()), mWidth(pFb->width()), mHeight(pFb->height()),
    1348         m_dScaleFactor(pFb->scaleFactor()), m_scaledSize(pFb->scaledSize()),
     1348        m_dScaleFactor(pFb->scaleFactor()), m_scaledSize(pFb->scaledSize()), m_fUseUnscaledHiDPIOutput(pFb->useUnscaledHiDPIOutput()),
    13491349        mUsesGuestVram(true) {}
    13501350
     
    13551355        mPixelFormat(aPixelFormat), mVRAM(aVRAM), mBitsPerPixel(aBitsPerPixel),
    13561356        mBytesPerLine(aBytesPerLine), mWidth(aWidth), mHeight(aHeight),
     1357        m_dScaleFactor(1.0), m_scaledSize(QSize()), m_fUseUnscaledHiDPIOutput(false),
    13571358        mUsesGuestVram(bUsesGuestVram) {}
    13581359
     
    13651366    double scaleFactor() const { return m_dScaleFactor; }
    13661367    QSize scaledSize() const { return m_scaledSize; }
     1368    bool useUnscaledHiDPIOutput() const { return m_fUseUnscaledHiDPIOutput; }
    13671369    bool usesGuestVram() const {return mUsesGuestVram;}
    13681370
     
    13771379    double m_dScaleFactor;
    13781380    QSize m_scaledSize;
     1381    bool m_fUseUnscaledHiDPIOutput;
    13791382    bool mUsesGuestVram;
    13801383};
Note: See TracChangeset for help on using the changeset viewer.

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