VirtualBox

Ignore:
Timestamp:
Mar 1, 2013 3:20:32 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: more window attr handling fixes

File:
1 edited

Legend:

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

    r44886 r44887  
    421421        showIt = 0;
    422422    else
    423         showIt = window->BltInfo.Base.id != CR_RENDER_DEFAULT_WINDOW_ID;
    424 
     423        showIt = (id != CR_RENDER_DEFAULT_WINDOW_ID);
    425424
    426425    /*
     
    813812        crWarning("RTCritSectEnter failed rc %d", rc);
    814813    }
     814}
     815
     816static void renderspuVBoxCompositorClearAllCB(unsigned long key, void *data1, void *data2)
     817{
     818    WindowInfo *window = (WindowInfo *) data1;
     819    renderspuVBoxCompositorSet(window, NULL);
     820}
     821
     822void renderspuVBoxCompositorClearAll()
     823{
     824    /* we need to clear window compositor, which is not that trivial though,
     825     * since the lock order used in presentation thread is compositor lock() -> hash table lock (aquired for id->window resolution)
     826     * this is why, to prevent potential deadlocks, we use crHashtableWalkUnlocked that does not hold the table lock
     827     * we are can be sure noone will modify the table here since renderspuVBoxCompositorClearAll can be called in the command (hgcm) thread only,
     828     * and the table can be modified from that thread only as well */
     829    crHashtableWalkUnlocked(render_spu.windowTable, renderspuVBoxCompositorClearAllCB, NULL);
    815830}
    816831
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