void WinDesktop::sendUpdate() { if (!m_extUpdSendingListener->isReadyToSend()) { Log::info(_T("nobody is ready for updates")); return; } UpdateContainer updCont; try { if (!m_fullReqRegion.isEmpty()) { Log::info(_T("set full update request to UpdateHandler")); m_updateHandler->setFullUpdateRequested(&m_fullReqRegion); } Log::info(_T("extracting updates from UpdateHandler")); m_updateHandler->extract(&updCont); } catch (Exception &e) { Log::info(_T("WinDesktop::sendUpdate() failed with error:%s"), e.getMessage()); m_extDeskTermListener->onAbnormalDesktopTerminate(); } if (!updCont.isEmpty() || !m_fullReqRegion.isEmpty()) { Log::info(_T("UpdateContainer is not empty.") _T(" Updates will be given to all.")); m_extUpdSendingListener->onSendUpdate(&updCont, m_updateHandler->getFrameBuffer(), m_updateHandler->getCursorShape()); Log::info(_T("Updates have been given to all.")); AutoLock al(&m_reqRegMutex); m_fullReqRegion.clear(); } else { Log::info(_T("UpdateContainer is empty")); } }
void UpdateHandlerImpl::onUpdate() { UpdateContainer updCont; m_updateKeeper.getUpdateContainer(&updCont); if (!updCont.isEmpty()) { doUpdate(); } }
void LocalUpdateHandler::onUpdate() { AutoLock al(&m_fbLocMut); UpdateContainer updCont; m_updateKeeper->getUpdateContainer(&updCont); if (!updCont.isEmpty()) { doUpdate(); } }