VirtualBox

Changeset 53157 in vbox


Ignore:
Timestamp:
Oct 27, 2014 5:24:02 PM (10 years ago)
Author:
vboxsync
Message:

Host 3D: Chronium server: Presentation framework: fixed resources leak (needs more testing on hosts other than X11).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp

    r53153 r53157  
    2525    mParentId(parentId)
    2626{
     27    crDebug("CrFbDisplayWindow: created with parentID %p.", parentId);
    2728    mFlags.u32Value = 0;
    2829}
     
    7879    if (mpWindow && mpWindow->GetParentId())
    7980    {
    80         rc = mpWindow->Create();
    81         if (!RT_SUCCESS(rc))
    82         {
    83             WARN(("err"));
    84             return rc;
     81        if (!mpWindow->IsCreated())
     82        {
     83            rc = mpWindow->Create();
     84            if (!RT_SUCCESS(rc))
     85            {
     86                WARN(("err"));
     87                return rc;
     88            }
    8589        }
    8690    }
     
    101105    if (mpWindow && mpWindow->GetParentId())
    102106    {
    103         rc = mpWindow->Create();
    104         if (!RT_SUCCESS(rc))
    105         {
    106             WARN(("err"));
    107             return rc;
     107        if (!mpWindow->IsCreated())
     108        {
     109            rc = mpWindow->Create();
     110            if (!RT_SUCCESS(rc))
     111            {
     112                WARN(("err"));
     113                return rc;
     114            }
    108115        }
    109116    }
     
    124131    if (mpWindow && mpWindow->GetParentId())
    125132    {
    126         rc = mpWindow->Create();
    127         if (!RT_SUCCESS(rc))
    128         {
    129             WARN(("err"));
    130             return rc;
     133        if (!mpWindow->IsCreated())
     134        {
     135            rc = mpWindow->Create();
     136            if (!RT_SUCCESS(rc))
     137            {
     138                WARN(("err"));
     139                return rc;
     140            }
    131141        }
    132142    }
     
    147157    if (mpWindow && mpWindow->GetParentId())
    148158    {
    149         rc = mpWindow->Create();
    150         if (!RT_SUCCESS(rc))
    151         {
    152             WARN(("err"));
    153             return rc;
     159        if (!mpWindow->IsCreated())
     160        {
     161            rc = mpWindow->Create();
     162            if (!RT_SUCCESS(rc))
     163            {
     164                WARN(("err"));
     165            return rc;
     166            }
    154167        }
    155168    }
     
    251264        return VERR_INVALID_STATE;
    252265    }
     266
     267    crDebug("CrFbDisplayWindow: change parent from %p to %p.", mParentId, parentId);
    253268
    254269    mParentId = parentId;
     
    424439    int rc = VINF_SUCCESS;
    425440
     441    crDebug("CrFbDisplayWindow: sync window dimentions: fForceCleanup=%s, mpWindow=%p, isActive()=%s",
     442        fForceCleanup ? "yes" : "no",
     443        mpWindow,
     444        isActive() ? "yes" : "no");
     445
    426446    if (!mpWindow)
    427447        return VINF_SUCCESS;
     
    545565        if (mpWindow && mpWindow->GetParentId())
    546566        {
     567            if (mpWindow->IsCreated())
     568                mpWindow->Destroy();
     569
    547570            rc = mpWindow->Create();
    548571            if (!RT_SUCCESS(rc))
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/window.cpp

    r53145 r53157  
    6161int CrFbWindow::Reparent(uint64_t parentId)
    6262{
     63    crDebug("CrFbWindow: reparent to %p (current mxPos=%d, myPos=%d, mWidth=%u, mHeight=%u)",
     64        parentId, mxPos, myPos, mWidth, mHeight);
     65
    6366    if (!checkInitedUpdating())
    6467    {
     
    7881        renderspuSetWindowId(mParentId);
    7982        renderspuReparentWindow(mSpuWindow);
    80         renderspuSetWindowId(cr_server.screen[0].winID);
    8183
    8284        if (parentId)
     
    100102    }
    101103
    102     LOG(("CrWIN: Vidible [%d]", fVisible));
     104    LOG(("CrWIN: Visible [%d]", fVisible));
    103105
    104106    if (!fVisible != !mFlags.fVisible)
     
    265267    if (mSpuWindow)
    266268    {
    267         //WARN(("window already created"));
     269        WARN(("window already created"));
    268270        return VINF_ALREADY_INITIALIZED;
    269271    }
     
    286288        cr_server.head_spu->dispatch_table.WindowShow(mSpuWindow, true);
    287289
     290    crDebug("CrFbWindow: create window with parent %p (mxPos=%d, myPos=%d, mWidth=%u, mHeight=%u)",
     291        mParentId, mxPos, myPos, mWidth, mHeight);
     292
    288293    return VINF_SUCCESS;
    289294}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c

    r52560 r53157  
    619619{
    620620    render_spu_parent_window_id = winId;
    621 }
     621    crDebug("X11: set new parent window %p (no actual reparent performed)", winId);
     622}
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