VirtualBox

Ignore:
Timestamp:
Mar 1, 2013 9:09:26 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: resize fixes, more to follow

Location:
trunk/src/VBox/HostServices/SharedOpenGL/render
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r44860 r44880  
    510510    window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
    511511    if (window) {
    512         renderspu_SystemWindowSize( window, w, h );
    513         window->BltInfo.width  = w;
    514         window->BltInfo.height = h;
     512        if (w != window->BltInfo.width
     513                || h != window->BltInfo.height)
     514        {
     515            /* window is resized, compositor data is no longer valid
     516             * this set also ensures all redraw operations are done in the redraw thread
     517             * and that no redraw is started until new Present request comes containing a valid presentation data */
     518            renderspuVBoxCompositorSet( window, NULL);
     519            renderspu_SystemWindowSize( window, w, h );
     520            window->BltInfo.width  = w;
     521            window->BltInfo.height = h;
     522        }
    515523    }
    516524    else {
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r44813 r44880  
    785785- (void)setSize:(NSSize)size
    786786{
     787    NSOpenGLContext *pCurCtx;
     788    NSView *pCurView;
    787789    m_Size = size;
    788790
    789     {
    790         DEBUG_MSG(("OVIW(%p): setSize: new size: %dx%d\n", (void*)self, (int)size.width, (int)size.height));
    791         [self reshape];
    792         [self createDockTile];
    793         /* have to rebind GL_TEXTURE_RECTANGLE_ARB as m_FBOTexId could be changed in updateFBO call */
    794         m_fNeedViewportUpdate = true;
     791    DEBUG_MSG(("OVIW(%p): setSize: new size: %dx%d\n", (void*)self, (int)size.width, (int)size.height));
     792    [self reshape];
     793    [self createDockTile];
     794    /* have to rebind GL_TEXTURE_RECTANGLE_ARB as m_FBOTexId could be changed in updateFBO call */
     795    m_fNeedViewportUpdate = true;
     796    pCurCtx = vboxCtxGetCurrent();
     797    if (pCurCtx && pCurCtx == m_pGLCtx && (pCurView = [pCurCtx view]) == self)
     798    {
     799        [m_pGLCtx update];
     800        m_fNeedCtxUpdate = false;
     801    }
     802    else
     803    {
     804        /* do it in a lazy way */
    795805        m_fNeedCtxUpdate = true;
    796806    }
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