VirtualBox

Changeset 37063 in vbox


Ignore:
Timestamp:
May 13, 2011 10:21:28 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: fix second monitor image corruptions on 64bit

File:
1 edited

Legend:

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

    r35615 r37063  
    188188        }
    189189        else
     190        {
     191#ifdef RT_ARCH_AMD64
     192            /* Not sure who to blame, but it seems on 64bit there goes
     193             * something terrible wrong (on a second monitor) when directly
     194             * using CGImageCreateWithImageInRect without making a copy. We saw
     195             * something like this already with the scale mode. */
     196            CGImageRef tmpImage = CGImageCreateWithImageInRect(m_image, CGRectMake(m_pMachineView->contentsX(), m_pMachineView->contentsY(), m_pMachineView->visibleWidth(), m_pMachineView->visibleHeight()));
     197            subImage = CGImageCreateCopy(tmpImage);
     198            CGImageRelease(tmpImage);
     199#else
    190200            subImage = CGImageCreateWithImageInRect(m_image, CGRectMake(m_pMachineView->contentsX(), m_pMachineView->contentsY(), m_pMachineView->visibleWidth(), m_pMachineView->visibleHeight()));
     201#endif
     202        }
    191203        Assert(VALID_PTR(subImage));
    192204        /* Clear the background (Make the rect fully transparent) */
     
    329341        }
    330342        else
     343        {
     344#ifdef RT_ARCH_AMD64
     345            /* Not sure who to blame, but it seems on 64bit there goes
     346             * something terrible wrong (on a second monitor) when directly
     347             * using CGImageCreateWithImageInRect without making a copy. We saw
     348             * something like this already with the scale mode. */
     349            CGImageRef tmpImage = CGImageCreateWithImageInRect(m_image, ::darwinToCGRect(is));
     350            subImage = CGImageCreateCopy(tmpImage);
     351            CGImageRelease(tmpImage);
     352#else
    331353            subImage = CGImageCreateWithImageInRect(m_image, ::darwinToCGRect(is));
     354#endif
     355        }
    332356        if (subImage)
    333357        {
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