VirtualBox

Changeset 30752 in vbox


Ignore:
Timestamp:
Jul 8, 2010 10:31:34 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: New running VM core: Separate viewport creation of frame-buffer creation allow separately re-implement both of them.

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

Legend:

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

    r30673 r30752  
    209209}
    210210
    211 void UIMachineView::prepareFrameBuffer()
     211void UIMachineView::prepareViewport()
    212212{
    213213    /* Prepare viewport: */
     
    226226#endif /* !VBOX_GUI_USE_QGLFB */
    227227    setViewport(pViewport);
    228 
    229     CDisplay display = session().GetConsole().GetDisplay();
    230     Assert(!display.isNull());
    231     m_pFrameBuffer = NULL;
    232 
     228}
     229
     230void UIMachineView::prepareFrameBuffer()
     231{
     232    /* Prepare frame-buffer depending on render-mode: */
    233233    switch (vboxGlobal().vmRenderMode())
    234234    {
     
    345345            break;
    346346    }
     347
     348    /* If frame-buffer was prepared: */
    347349    if (m_pFrameBuffer)
    348350    {
     351        /* Prepare display: */
     352        CDisplay display = session().GetConsole().GetDisplay();
     353        Assert(!display.isNull());
    349354#ifdef VBOX_WITH_VIDEOHWACCEL
    350355        CFramebuffer fb(NULL);
     
    352357        {
    353358            LONG XOrigin, YOrigin;
    354             /* check if the framebuffer is already assigned
    355              * in this case we do not need to re-assign it
    356              * neither do we need to AddRef */
     359            /* Check if the framebuffer is already assigned;
     360             * in this case we do not need to re-assign it neither do we need to AddRef. */
    357361            display.GetFramebuffer(m_uScreenId, fb, XOrigin, YOrigin);
    358362        }
     
    362366            m_pFrameBuffer->AddRef();
    363367        }
    364 
    365         /* always perform SetFramebuffer to ensure 3D gets notified */
     368        /* Always perform SetFramebuffer to ensure 3D gets notified: */
    366369        display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));
    367370    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r30637 r30752  
    8787
    8888    /* Prepare routines: */
     89    virtual void prepareViewport();
    8990    virtual void prepareFrameBuffer();
    9091    virtual void prepareCommon();
     
    99100    //virtual void cleanupCommon() {}
    100101    virtual void cleanupFrameBuffer();
     102    //virtual void cleanupViewport();
    101103
    102104    /* Protected getters: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r30674 r30752  
    5858    loadMachineViewSettings();
    5959
     60    /* Prepare viewport: */
     61    prepareViewport();
     62
    6063    /* Prepare frame buffer: */
    6164    prepareFrameBuffer();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r30709 r30752  
    5252    /* Load machine view settings: */
    5353    loadMachineViewSettings();
     54
     55    /* Prepare viewport: */
     56    prepareViewport();
    5457
    5558    /* Prepare frame buffer: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r30709 r30752  
    5656    loadMachineViewSettings();
    5757
     58    /* Prepare viewport: */
     59    prepareViewport();
     60
    5861    /* Prepare frame buffer: */
    5962    prepareFrameBuffer();
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