VirtualBox

Changeset 52903 in vbox


Ignore:
Timestamp:
Sep 30, 2014 5:10:24 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI rework/cleanup for 7115 (part #2): Some frame-buffer rework related to r96322.

File:
1 edited

Legend:

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

    r52902 r52903  
    317317                                              ComSafeArrayIn(BYTE, image))
    318318{
    319     // TODO: Retina handling..
    320 
    321     /* Copying received data (is it shallow?): */
     319    /* Retina screens with physical-to-logical scaling requires
     320     * odd/even pixel updates to be taken into account,
     321     * otherwise we have artifacts on the borders of incoming rectangle. */
     322    uX = qMax(0, (int)uX - 1);
     323    uY = qMax(0, (int)uY - 1);
     324    uWidth = qMin(m_iWidth, (int)uWidth + 2);
     325    uHeight = qMin(m_iHeight, (int)uHeight + 2);
     326
     327    /* Wrapping received data: */
    322328    com::SafeArray<BYTE> imageData(ComSafeArrayInArg(image));
    323329
     
    325331    lock();
    326332
    327     // TODO: Why does this handling so different from UIFrameBuffer::NotifyUpdate?
    328     //       And where is the part about m_fUnused?
    329 
     333    /* Make sure frame-buffer is used: */
     334    if (m_fUnused)
     335    {
     336        LogRel2(("UIFrameBuffer::NotifyUpdateImage: Origin=%lux%lu, Size=%lux%lu, Ignored!\n",
     337                 (unsigned long)uX, (unsigned long)uY,
     338                 (unsigned long)uWidth, (unsigned long)uHeight));
     339
     340        /* Unlock access to frame-buffer: */
     341        unlock();
     342
     343        /* Ignore NotifyUpdate: */
     344        return E_FAIL;
     345    }
     346
     347    /* Directly update m_image: */
    330348    if (m_fUpdatesAllowed)
    331349    {
     
    340358            pu8Src += uWidth * 4;
    341359        }
     360
     361        /* Widget update is NOT thread-safe and *seems* never will be,
     362         * We have to notify machine-view with the async-signal to perform update operation. */
    342363        LogRel2(("UIFrameBuffer::NotifyUpdateImage: Origin=%lux%lu, Size=%lux%lu, Sending to async-handler\n",
    343364                 (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