VirtualBox

Ignore:
Timestamp:
Aug 18, 2014 4:10:53 PM (10 years ago)
Author:
vboxsync
Message:

crOpenGL: don't repaint invisible windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r52391 r52398  
    930930
    931931    /* ensure window contents is updated after that */
    932     [self setNeedsDisplay:YES];
     932    [self performSelectorOnMainThread:@selector(vboxTryDrawUI) withObject:nil waitUntilDone:NO];
    933933}
    934934
     
    11791179{
    11801180    glFlush();
    1181                        
     1181                 
     1182    DEBUG_MSG(("My[%p]: Draw\n", self));     
    11821183    /* issue to the gui thread */
    11831184    [self performSelectorOnMainThread:@selector(vboxTryDrawUI) withObject:nil waitUntilDone:NO];
     
    12041205- (void)vboxTryDrawUI
    12051206{
     1207    DEBUG_MSG(("My[%p]: DrawUI\n", self));
    12061208    const VBOXVR_SCR_COMPOSITOR *pCompositor;
    12071209    int rc = renderspuVBoxCompositorLock(m_pWinInfo, &pCompositor);
     
    12141216    if (!pCompositor && !m_fCleanupNeeded)
    12151217    {
     1218        DEBUG_MSG(("My[%p]: noCompositorUI\n", self));
    12161219        renderspuVBoxCompositorUnlock(m_pWinInfo);
    12171220        return;
     
    12441247    else
    12451248    {
     1249        DEBUG_MSG(("My[%p]: NeedCleanup\n", self));
    12461250        Assert(m_fCleanupNeeded);
    12471251        CrVrScrCompositorInit(&TmpCompositor, NULL);
     
    12541258        [self unlockFocus];
    12551259    }
     1260    else if (!m_pWinInfo->visible)
     1261    {
     1262        DEBUG_MSG(("My[%p]: NotVisible\n", self));
     1263        m_fCleanupNeeded = false;
     1264    }
    12561265    else
    12571266    {
     1267        DEBUG_MSG(("My[%p]: Reschedule\n", self));
    12581268        [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(vboxTryDrawUI) userInfo:nil repeats:NO];
    12591269    }
     
    12981308            }
    12991309           
    1300             m_fCleanupNeeded = GL_FALSE;
     1310            m_fCleanupNeeded = false;
    13011311           
    13021312            /* Render FBO content to the dock tile when necessary. */
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