VirtualBox

Changeset 42982 in vbox for trunk/src


Ignore:
Timestamp:
Aug 24, 2012 7:30:14 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 5094: Additional patch for r80309, mac frame-buffer part.

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

Legend:

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

    r38311 r42982  
    3333#include "UIMachineLogic.h"
    3434#include "VBoxUtils.h"
     35#include "UISession.h"
    3536
    3637#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     
    4849    : UIFrameBuffer(pMachineView)
    4950    , m_pMachineLogic(pMachineView->machineLogic())
     51    , m_fUsesGuestVRAM(false)
    5052    , m_pDataAddress(NULL)
    5153    , m_pBitmapData(NULL)
     
    155157void UIFrameBufferQuartz2D::paintEvent(QPaintEvent *aEvent)
    156158{
     159    /* If the machine is NOT in 'running' state,
     160     * the link between framebuffer and video memory
     161     * is broken, we should go fallback now... */
     162    if (m_fUsesGuestVRAM && !m_pMachineView->uisession()->isRunning())
     163    {
     164        /* Simulate fallback through fake resize-event: */
     165        UIResizeEvent event(FramebufferPixelFormat_Opaque, NULL, 0, 0, 640, 480);
     166        resizeEvent(&event);
     167    }
     168
    157169    /* For debugging /Developer/Applications/Performance Tools/Quartz
    158170     * Debug.app is a nice tool to see which parts of the screen are
     
    404416        && aEvent->bitsPerPixel() == 32)
    405417    {
     418        m_fUsesGuestVRAM = true;
    406419//        printf ("VRAM\n");
    407420        /* Create the image copy of the framebuffer */
     
    415428    else
    416429    {
     430        m_fUsesGuestVRAM = false;
    417431        remind = true;
    418432//        printf ("No VRAM\n");
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.h

    r35215 r42982  
    6161
    6262    UIMachineLogic *m_pMachineLogic;
     63    bool m_fUsesGuestVRAM;
    6364    uchar *m_pDataAddress;
    6465    void *m_pBitmapData;
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