VirtualBox

Ignore:
Timestamp:
Sep 10, 2012 11:57:37 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80677
Message:

crOpenGL/win: fix window flashing on VM creation

File:
1 edited

Legend:

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

    r43240 r43266  
    841841    }
    842842
     843    window->visible = showIt;
     844
     845    if (!showIt)
     846    {
     847        renderspu_SystemShowWindow( window, 0 );
     848        if (window->height <= 0 || window->width <= 0)
     849        {
     850            renderspu_SystemWindowSize(window,
     851                    window->width > 0 ? window->width : 4,
     852                    window->height > 0 ? window->height : 4);
     853        }
     854    }
     855    else
     856    {
     857        crDebug( "Render SPU: Showing the window" );
     858        crDebug("renderspu_SystemCreateWindow: showwindow: %x", window->hWnd);
     859    }
     860
     861    CRASSERT(!window->visible == !showIt);
     862
    843863    /* Intel drivers require a window to be visible for proper 3D rendering,
    844864     * so set it visible and handle the visibility with visible regions (see below) */
     
    866886        crError( "Render SPU: Couldn't set up the device context!  Yikes!" );
    867887        return GL_FALSE;
    868     }
    869 
    870     window->visible = showIt;
    871 
    872     if (!showIt)
    873     {
    874         renderspu_SystemShowWindow( window, 0 );
    875         if (window->height <= 0 || window->width <= 0)
    876         {
    877             renderspu_SystemWindowSize(window,
    878                     window->width > 0 ? window->width : 4,
    879                     window->height > 0 ? window->height : 4);
    880         }
    881     }
    882     else
    883     {
    884         crDebug( "Render SPU: Showing the window" );
    885         crDebug("renderspu_SystemCreateWindow: showwindow: %x", window->hWnd);
    886888    }
    887889
     
    11041106    }
    11051107
     1108    window->visible = 1;
     1109
     1110    if (!showIt)
     1111    {
     1112        renderspu_SystemShowWindow( window, 0 );
     1113        if (window->height <= 0 || window->width <= 0)
     1114        {
     1115            renderspu_SystemWindowSize(window,
     1116                    window->width > 0 ? window->width : 4,
     1117                    window->height > 0 ? window->height : 4);
     1118        }
     1119    }
     1120    else
     1121    {
     1122        crDebug( "Render SPU: Showing the window" );
     1123        crDebug("renderspu_SystemCreateWindow: showwindow: %x", window->hWnd);
     1124    }
     1125
     1126    CRASSERT(!window->visible == !showIt);
     1127
    11061128    /* Intel drivers require a window to be visible for proper 3D rendering,
    11071129     * so set it visible and handle the visibility with visible regions (see below) */
     
    11291151        crError( "Render SPU: Couldn't set up the device context!  Yikes!" );
    11301152        return GL_FALSE;
    1131     }
    1132 
    1133     window->visible = showIt;
    1134 
    1135     if (!showIt)
    1136     {
    1137         renderspu_SystemShowWindow( window, 0 );
    1138         if (window->height <= 0 || window->width <= 0)
    1139         {
    1140             renderspu_SystemWindowSize(window,
    1141                     window->width > 0 ? window->width : 4,
    1142                     window->height > 0 ? window->height : 4);
    1143         }
    1144     }
    1145     else
    1146     {
    1147         crDebug( "Render SPU: Showing the window" );
    1148         crDebug("renderspu_SystemCreateWindow: showwindow: %x", window->hWnd);
    11491153    }
    11501154
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette