VirtualBox

Changeset 38505 in vbox


Ignore:
Timestamp:
Aug 23, 2011 4:26:21 AM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: fix incorrect rendering when switching to/from fullscreen with enabled 2d accel

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r38476 r38505  
    145145else ifdef VBOX_GUI_USE_QGL
    146146 VirtualBox_DEFS        += VBOX_GUI_USE_QGL
     147endif
     148ifdef VBOX_WITH_CROGL
     149 VirtualBox_DEFS        += VBOX_WITH_CROGL
    147150endif
    148151ifdef VBOX_WITH_VIRTIO
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r38348 r38505  
    486486            Assert(m_pFrameBuffer == uisession()->frameBuffer(screenId()));
    487487            m_pFrameBuffer->setView(NULL);
     488#ifdef VBOX_WITH_CROGL
     489            /* Call SetFramebuffer to ensure 3D gets notified of view being destroyed */
     490            CDisplay display = session().GetConsole().GetDisplay();
     491            display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));
     492#endif
    488493        }
    489494        else
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r37433 r38505  
    13531353                {
    13541354                    CHECK_ERROR_RET(pFramebuffer, COMGETTER(WinId)(&winId), rc);
    1355                     CHECK_ERROR_RET(pFramebuffer, COMGETTER(Width)(&w), rc);
    1356                     CHECK_ERROR_RET(pFramebuffer, COMGETTER(Height)(&h), rc);
    1357 
    1358                     rc = crVBoxServerMapScreen(screenId, xo, yo, w, h, winId);
    1359                     AssertRCReturn(rc, rc);
     1355
     1356                    if (!winId)
     1357                    {
     1358                        /* View associated with framebuffer is destroyed, happens with 2d accel enabled */
     1359                        rc = crVBoxServerUnmapScreen(screenId);
     1360                        AssertRCReturn(rc, rc);
     1361                    }
     1362                    else
     1363                    {
     1364                        CHECK_ERROR_RET(pFramebuffer, COMGETTER(Width)(&w), rc);
     1365                        CHECK_ERROR_RET(pFramebuffer, COMGETTER(Height)(&h), rc);
     1366
     1367                        rc = crVBoxServerMapScreen(screenId, xo, yo, w, h, winId);
     1368                        AssertRCReturn(rc, rc);
     1369                    }
    13601370                }
    13611371
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r37613 r38505  
    11571157DECLEXPORT(int32_t) crVBoxServerUnmapScreen(int sIndex)
    11581158{
     1159    crDebug("crVBoxServerUnmapScreen(%i)", sIndex);
     1160
    11591161    if (sIndex<0 || sIndex>=cr_server.screenCount)
    11601162        return VERR_INVALID_PARAMETER;
     
    11741176DECLEXPORT(int32_t) crVBoxServerMapScreen(int sIndex, int32_t x, int32_t y, uint32_t w, uint32_t h, uint64_t winID)
    11751177{
    1176     crDebug("crVBoxServerMapScreen(%i) [%i,%i:%u,%u]", sIndex, x, y, w, h);
     1178    crDebug("crVBoxServerMapScreen(%i) [%i,%i:%u,%u %x]", sIndex, x, y, w, h, winID);
    11771179
    11781180    if (sIndex<0 || sIndex>=cr_server.screenCount)
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r36231 r38505  
    8787
    8888        case WM_DESTROY:
    89             crDebug( "Render SPU: caught WM_DESTROY for our window" );
     89            crDebug("Render SPU: caught WM_DESTROY for our window %x", hWnd);
    9090            break;
    9191
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r38275 r38505  
    29912991        /* Setup the new framebuffer, the resize will lead to an updateDisplayData call. */
    29922992        DISPLAYFBINFO *pFBInfo = &that->maFramebuffers[uScreenId];
     2993
     2994#if defined(VBOX_WITH_CROGL)
     2995        /* Leave the lock, because SHCRGL_HOST_FN_SCREEN_CHANGED will read current framebuffer */
     2996        {
     2997            BOOL is3denabled;
     2998            that->mParent->machine()->COMGETTER(Accelerate3DEnabled)(&is3denabled);
     2999
     3000            if (is3denabled)
     3001            {
     3002                alock.leave ();
     3003            }
     3004        }
     3005#endif
    29933006
    29943007        if (pFBInfo->fVBVAEnabled && pFBInfo->pu8FramebufferVRAM)
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