VirtualBox

Changeset 53860 in vbox


Ignore:
Timestamp:
Jan 19, 2015 6:18:58 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Subsequent frame-buffer cleanup.

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

Legend:

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

    r53859 r53860  
    6262    , m_fUnused(false)
    6363    , m_fAutoEnabled(false)
    64     , m_dScaleFactor(gEDataManager->scaleFactor(vboxGlobal().managedVMUuid()))
    65     , m_fUseUnscaledHiDPIOutput(gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
     64    , m_dScaleFactor(1.0)
     65    , m_dBackingScaleFactor(1.0)
     66    , m_fUseUnscaledHiDPIOutput(false)
    6667    , m_hiDPIOptimizationType(HiDPIOptimizationType_None)
    67     , m_dBackingScaleFactor(1.0)
    6868{
    6969    /* Update coordinate-system: */
     
    695695
    696696    unlock();
     697
     698    /* Update scaled-size according scale-factor: */
     699    setScaledSize(scaleFactor() == 1.0 ? scaledSize() : QSize(m_iWidth * scaleFactor(), m_iHeight * scaleFactor()));
    697700}
    698701
     
    772775
    773776    /* Update scaled-size according scale-factor: */
    774     setScaledSize(m_dScaleFactor == 1.0 ? QSize() : QSize(m_iWidth * dScaleFactor, m_iHeight * dScaleFactor));
     777    setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize(m_iWidth * scaleFactor(), m_iHeight * scaleFactor()));
    775778
    776779    /* Update coordinate-system: */
     
    975978    QPixmap subPixmap = QPixmap(rect.width(), rect.height());
    976979
    977     /* If HiDPI 'backing scale factor' defined: */
     980    /* If HiDPI 'backing-scale-factor' defined: */
    978981    if (dBackingScaleFactor > 1.0)
    979982    {
     
    10351038    QPixmap subPixmap = QPixmap::fromImage(subImage);
    10361039
    1037     /* If HiDPI 'backing scale factor' defined: */
     1040    /* If HiDPI 'backing-scale-factor' defined: */
    10381041    if (dBackingScaleFactor > 1.0)
    10391042    {
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r53859 r53860  
    214214#endif /* VBOX_WITH_VIDEOHWACCEL */
    215215
     216    /** Returns the scale-factor used by the frame-buffer. */
     217    double scaleFactor() const { return m_dScaleFactor; }
     218    /** Define the scale-factor used by the frame-buffer. */
     219    void setScaleFactor(double dScaleFactor);
     220
     221    /** Returns backing-scale-factor used by HiDPI frame-buffer. */
     222    double backingScaleFactor() const { return m_dBackingScaleFactor; }
     223    /** Defines backing-scale-factor used by HiDPI frame-buffer. */
     224    void setBackingScaleFactor(double dBackingScaleFactor);
     225
    216226    /** Returns whether frame-buffer should use unscaled HiDPI output. */
    217227    bool useUnscaledHiDPIOutput() const { return m_fUseUnscaledHiDPIOutput; }
     
    221231    /** Define HiDPI frame-buffer optimization type: */
    222232    void setHiDPIOptimizationType(HiDPIOptimizationType optimizationType) { m_hiDPIOptimizationType = optimizationType; }
    223 
    224     /** Returns the scale-factor used by the frame-buffer. */
    225     double scaleFactor() const { return m_dScaleFactor; }
    226     /** Define the scale-factor used by the frame-buffer. */
    227     void setScaleFactor(double dScaleFactor);
    228 
    229     /** Return backing scale factor used by HiDPI frame-buffer. */
    230     double backingScaleFactor() const { return m_dBackingScaleFactor; }
    231     /** Define backing scale factor used by HiDPI frame-buffer. */
    232     void setBackingScaleFactor(double dBackingScaleFactor);
    233233
    234234protected slots:
     
    330330    /** @name HiDPI screens related variables.
    331331     * @{ */
     332    /** Holds backing-scale-factor used by HiDPI frame-buffer. */
     333    double m_dBackingScaleFactor;
    332334    /** Holds whether frame-buffer should use unscaled HiDPI output. */
    333335    bool m_fUseUnscaledHiDPIOutput;
    334336    /** Holds HiDPI frame-buffer optimization type. */
    335337    HiDPIOptimizationType m_hiDPIOptimizationType;
    336     /** Holds backing scale factor used by HiDPI frame-buffer. */
    337     double m_dBackingScaleFactor;
    338338    /** @} */
    339339
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