VirtualBox

Ignore:
Timestamp:
Jan 28, 2011 3:23:22 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69735
Message:

crOpenGL: fix deadlock with multiply screens (#5462)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c

    r34270 r35770  
    337337        if (crServerIntersectScreen(mural, i, &rect))
    338338        {
    339             tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1));
    340             if (!tmppixels)
    341             {
    342                 crWarning("Out of memory in crServerPresentFBO");
    343                 crFree(pixels);
    344                 return;
    345             }
    346 
    347339            /* rect in window relative coords */
    348340            crServerTransformRect(&rectwr, &rect, -mural->gX, -mural->gY);
     
    350342            if (!mural->pVisibleRects)
    351343            {
     344                tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1));
     345                if (!tmppixels)
     346                {
     347                    crWarning("Out of memory in crServerPresentFBO");
     348                    crFree(pixels);
     349                    return;
     350                }
     351
    352352                crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight);
     353                /*Note: pfnPresentFBO would free tmppixels*/
    353354                cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1);
    354355            }
     
    359360                    if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], &sectr))
    360361                    {
     362                        tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1));
     363                        if (!tmppixels)
     364                        {
     365                            crWarning("Out of memory in crServerPresentFBO");
     366                            crFree(pixels);
     367                            return;
     368                        }
     369
    361370                        crServerCopySubImage(tmppixels, pixels, &sectr, mural->fboWidth, mural->fboHeight);
     371                        /*Note: pfnPresentFBO would free tmppixels*/
    362372                        cr_server.pfnPresentFBO(tmppixels, i,
    363373                                                sectr.x1+mural->gX-cr_server.screen[i].x,
     
    367377                }
    368378            }
    369 
    370             crFree(tmppixels);
    371379        }
    372380    }
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