VirtualBox

Ignore:
Timestamp:
Mar 5, 2013 10:36:38 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL/OSX: synch window reshape

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

Legend:

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

    r44913 r44922  
    916916    }
    917917    return NULL;
     918}
     919
     920int renderspuVBoxCompositorLock(WindowInfo *window)
     921{
     922    int rc = RTCritSectEnter(&window->CompositorLock);
     923    AssertRC(rc);
     924    return rc;
     925}
     926
     927int renderspuVBoxCompositorUnlock(WindowInfo *window)
     928{
     929    int rc = RTCritSectLeave(&window->CompositorLock);
     930    AssertRC(rc);
     931    return rc;
    918932}
    919933
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h

    r44913 r44922  
    395395extern void renderspuVBoxCompositorSet( WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR * pCompositor);
    396396extern void renderspuVBoxCompositorClearAll();
     397extern int renderspuVBoxCompositorLock(WindowInfo *window);
     398extern int renderspuVBoxCompositorUnlock(WindowInfo *window);
    397399extern struct VBOXVR_SCR_COMPOSITOR * renderspuVBoxCompositorAcquire( WindowInfo *window);
    398400extern int renderspuVBoxCompositorTryAcquire(WindowInfo *window, struct VBOXVR_SCR_COMPOSITOR **ppCompositor);
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r44880 r44922  
    267267- (void)updateViewportCS;
    268268- (void)reshape;
     269- (void)reshapeLocked;
    269270
    270271- (void)createDockTile;
     
    841842}
    842843
    843 - (void)reshape
     844- (void)reshapeLocked
    844845{
    845846    NSRect parentFrame = NSZeroRect;
     
    906907    {
    907908        [self performSelectorMakingCurrent:m_pSharedGLCtx idSel:@selector(updateViewportCS)];
     909    }
     910}
     911
     912- (void)reshape
     913{
     914    int rc = renderspuVBoxCompositorLock(m_pWinInfo);
     915    if (RT_SUCCESS(rc))
     916    {
     917        [self reshapeLocked];
     918        renderspuVBoxCompositorUnlock(m_pWinInfo);
    908919    }
    909920}
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