VirtualBox

忽略:
時間撮記:
2014-8-21 下午07:20:27 (10 年 以前)
作者:
vboxsync
訊息:

crOpenGL: command blocks flushing

位置:
trunk
檔案:
修改 7 筆資料

圖例:

未更動
新增
刪除
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r51670 r52451  
    420420int CrPMgrLoadState(PSSMHANDLE pSSM, uint32_t version);
    421421HCR_FRAMEBUFFER CrPMgrFbGet(uint32_t idScreen);
     422int CrPMgrClearRegionsGlobal();
    422423/*cleanup stuff*/
    423424
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_config.c

    r51655 r52451  
    178178                | CR_VBOX_CAP_CMDBLOCKS
    179179                | CR_VBOX_CAP_GETATTRIBSLOCATIONS
     180                | CR_VBOX_CAP_CMDBLOCKS_FLUSH
    180181                ;
    181182    }
     
    328329                | CR_VBOX_CAP_CMDBLOCKS
    329330                | CR_VBOX_CAP_GETATTRIBSLOCATIONS
     331                | CR_VBOX_CAP_CMDBLOCKS_FLUSH
    330332                ;
    331333    }
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r52429 r52451  
    48904890}
    48914891
     4892int CrPMgrClearRegionsGlobal()
     4893{
     4894    for (HCR_FRAMEBUFFER hFb = CrPMgrFbGetFirstEnabled();
     4895            hFb;
     4896            hFb = CrPMgrFbGetNextEnabled(hFb))
     4897    {
     4898        int rc = CrFbUpdateBegin(hFb);
     4899        if (RT_SUCCESS(rc))
     4900        {
     4901            rc = CrFbRegionsClear(hFb);
     4902            if (RT_FAILURE(rc))
     4903            {
     4904                WARN(("CrFbRegionsClear failed %d", rc));
     4905            }
     4906
     4907            CrFbUpdateEnd(hFb);
     4908        }
     4909    }
     4910
     4911    return VINF_SUCCESS;
     4912}
     4913
    48924914int CrPMgrModeVrdp(bool fEnable)
    48934915{
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_stream.c

    r52260 r52451  
    655655            break;
    656656        }
     657        case CR_UNPACK_BUFFER_TYPE_CMDBLOCK_FLUSH: /* just flush for now */
     658        {
     659            CrPMgrClearRegionsGlobal(); /* clear regions to ensure we don't do MakeCurrent and friends */
     660            crServerPendProcess(conn);
     661            Assert(RTListIsEmpty(&conn->PendingMsgList));
     662            break;
     663        }
    657664        case CR_UNPACK_BUFFER_TYPE_CMDBLOCK_END:
    658665        {
    659             CRASSERT(!RTListIsEmpty(&conn->PendingMsgList));
     666//            CRASSERT(!RTListIsEmpty(&conn->PendingMsgList));
    660667            crServerPendProcess(conn);
    661668            Assert(RTListIsEmpty(&conn->PendingMsgList));
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py

    r50975 r52451  
    211211    const uint8_t *pu8Codes = (const uint8_t *)opcodes;
    212212
    213     CR_UNPACK_BUFFER_TYPE enmType;
    214213    uint8_t first;
    215214    uint8_t last;
     
    220219    first = pu8Codes[0];
    221220    last = pu8Codes[1-(int)num_opcodes];
    222 
    223     enmType = (first != CR_CMDBLOCKBEGIN_OPCODE) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_BEGIN;
    224 
    225     if (last != CR_CMDBLOCKEND_OPCODE)
    226         return enmType;
    227 
    228     /* last is CMDBLOCKEND*/
    229     return (enmType == CR_UNPACK_BUFFER_TYPE_CMDBLOCK_BEGIN) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_END;
     221   
     222    switch (last)
     223    {
     224        case CR_CMDBLOCKFLUSH_OPCODE:
     225            return CR_UNPACK_BUFFER_TYPE_CMDBLOCK_FLUSH;
     226        case CR_CMDBLOCKEND_OPCODE:
     227            return (first == CR_CMDBLOCKBEGIN_OPCODE) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_END;
     228        default:
     229            return (first != CR_CMDBLOCKBEGIN_OPCODE) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_BEGIN;
     230    }
    230231}
    231232
     
    288289            case CR_CMDBLOCKBEGIN_OPCODE:
    289290            case CR_CMDBLOCKEND_OPCODE:
     291            case CR_CMDBLOCKFLUSH_OPCODE:
    290292            case CR_NOP_OPCODE:
    291293                INCR_DATA_PTR_NO_ARGS( );
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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