VirtualBox

Changeset 50818 in vbox


Ignore:
Timestamp:
Mar 19, 2014 11:02:22 AM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Frame-buffer NotifyUpdate should take into account retina screens with physical-to-logical scaling.

File:
1 edited

Legend:

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

    r50250 r50818  
    284284STDMETHODIMP UIFrameBuffer::NotifyUpdate(ULONG uX, ULONG uY, ULONG uWidth, ULONG uHeight)
    285285{
     286    /* Retina screens with physical-to-logical scaling requires
     287     * odd/even pixel updates to be taken into account,
     288     * otherwise we have artifacts on the borders of incoming rectangle. */
     289    uX = qMax(0, (int)uX - 1);
     290    uY = qMax(0, (int)uY - 1);
     291    uWidth = qMin((int)m_width, (int)uWidth + 2);
     292    uHeight = qMin((int)m_height, (int)uHeight + 2);
     293
    286294    LogRel2(("UIFrameBuffer::NotifyUpdate: Origin=%lux%lu, Size=%lux%lu\n",
    287295             (unsigned long)uX, (unsigned long)uY,
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