当前位置: 首页>>代码示例>>C++>>正文


C++ Display::VideoAccelFlush方法代码示例

本文整理汇总了C++中Display::VideoAccelFlush方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::VideoAccelFlush方法的具体用法?C++ Display::VideoAccelFlush怎么用?C++ Display::VideoAccelFlush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Display的用法示例。


在下文中一共展示了Display::VideoAccelFlush方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LogSunlover

DECLCALLBACK(void) iface_VideoAccelFlush(PPDMIVMMDEVCONNECTOR pInterface)
{
    PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
    Console *pConsole = pDrv->pVMMDev->getParent();

    Display *display = pConsole->getDisplay();

    if (display)
    {
        LogSunlover(("MAIN::VMMDevInterface::iface_VideoAccelFlush\n"));
        display->VideoAccelFlush ();
    }
}
开发者ID:eaas-framework,项目名称:virtualbox,代码行数:13,代码来源:VMMDevInterface.cpp

示例2: if

/**
 * Periodic display refresh callback.
 *
 * @param  pInterface Display connector.
 */
DECLCALLBACK(void) Display::displayRefreshCallback(PPDMIDISPLAYCONNECTOR pInterface)
{
    PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);


    /* Contrary to displayUpdateCallback and displayResizeCallback
     * the framebuffer lock must be taken since the function
     * pointed to by pDrv->pUpPort->pfnUpdateDisplay is unaware
     * of any locking issues. */

    Display *pDisplay = pDrv->pDisplay;

    uint32_t u32ResizeStatus = pDisplay->mu32ResizeStatus;

    if (u32ResizeStatus == ResizeStatus_UpdateDisplayData)
    {
#ifdef DEBUG_sunlover
        LogFlowFunc (("ResizeStatus_UpdateDisplayData\n"));
#endif /* DEBUG_sunlover */
        /* The framebuffer was resized and display data need to be updated. */
        pDisplay->handleResizeCompletedEMT ();
        /* Continue with normal processing because the status here is ResizeStatus_Void. */
        Assert (pDisplay->mu32ResizeStatus == ResizeStatus_Void);
        /* Repaint the display because VM continued to run during the framebuffer resize. */
        pDrv->pUpPort->pfnUpdateDisplayAll(pDrv->pUpPort);
        /* Ignore the refresh to replay the logic. */
        return;
    }
    else if (u32ResizeStatus == ResizeStatus_InProgress)
    {
#ifdef DEBUG_sunlover
        LogFlowFunc (("ResizeStatus_InProcess\n"));
#endif /* DEBUG_sunlover */
        /* The framebuffer is being resized. Do not call the VGA device back. Immediately return. */
        return;
    }

    if (pDisplay->mfPendingVideoAccelEnable)
    {
        /* Acceleration was enabled while machine was not yet running
         * due to restoring from saved state. Update entire display and
         * actually enable acceleration.
         */
        Assert(pDisplay->mpPendingVbvaMemory);

        /* Acceleration can not be yet enabled.*/
        Assert(pDisplay->mpVbvaMemory == NULL);
        Assert(!pDisplay->mfVideoAccelEnabled);

        if (pDisplay->mfMachineRunning)
        {
            pDisplay->VideoAccelEnable (pDisplay->mfPendingVideoAccelEnable, pDisplay->mpPendingVbvaMemory);

            /* Reset the pending state. */
            pDisplay->mfPendingVideoAccelEnable = false;
            pDisplay->mpPendingVbvaMemory = NULL;
        }
    }
    else
    {
        Assert(pDisplay->mpPendingVbvaMemory == NULL);

        if (pDisplay->mfVideoAccelEnabled)
        {
            Assert(pDisplay->mpVbvaMemory);
            pDisplay->VideoAccelFlush ();
        }
        else
        {
            Assert(pDrv->Connector.pu8Data);
            pDisplay->mFramebuffer->Lock();
            pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
            pDisplay->mFramebuffer->Unlock();
        }
    }
}
开发者ID:,项目名称:,代码行数:81,代码来源:


注:本文中的Display::VideoAccelFlush方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。