5a96feeef6545e3b78a0e84669406a9ee2c8da2fvboxsync * Presenter API: CrFbDisplayVrdp class implementation -- display content over VRDP.
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * Copyright (C) 2014 Oracle Corporation
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * available from http://www.virtualbox.org. This file is free software;
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * you can redistribute it and/or modify it under the terms of the GNU
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * General Public License (GPL) as published by the Free Software
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryCreated(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryCreated(pFb, hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryReplaced(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hNewEntry, HCR_FRAMEBUFFER_ENTRY hReplacedEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryReplaced(pFb, hNewEntry, hReplacedEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pReplacedEntry = CrFbEntryGetCompositorEntry(hReplacedEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CR_TEXDATA *pReplacedTex = CrVrScrCompositorEntryTexGet(pReplacedEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pNewEntry = CrFbEntryGetCompositorEntry(hNewEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CR_TEXDATA *pNewTex = CrVrScrCompositorEntryTexGet(pNewEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryTexChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryTexChanged(pFb, hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pEntry = CrFbEntryGetCompositorEntry(hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CR_TEXDATA *pTex = CrVrScrCompositorEntryTexGet(pEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryRemoved(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryRemoved(pFb, hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pEntry = CrFbEntryGetCompositorEntry(hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CR_TEXDATA *pTex = CrVrScrCompositorEntryTexGet(pEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryDestroyed(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryDestroyed(pFb, hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::EntryPosChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrFbDisplayBase::EntryPosChanged(pFb, hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::RegionsChanged(struct CR_FRAMEBUFFER *pFb)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::FramebufferChanged(struct CR_FRAMEBUFFER *pFb)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const struct VBVAINFOSCREEN* pScreenInfo = CrFbGetScreenInfo(getFramebuffer());
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncvoid CrFbDisplayVrdp::vrdpDestroy(HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync void *pVrdp = CrFbDDataEntryGet(hEntry, slotGet());
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncvoid CrFbDisplayVrdp::vrdpGeometry(HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync void *pVrdp = CrFbDDataEntryGet(hEntry, slotGet());
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pEntry = CrFbEntryGetCompositorEntry(hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync mPos.x + CrVrScrCompositorEntryRectGet(pEntry)->xLeft,
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync mPos.y + CrVrScrCompositorEntryRectGet(pEntry)->yTop,
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpRegions(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync void *pVrdp = CrFbDDataEntryGet(hEntry, slotGet());
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const struct VBOXVR_SCR_COMPOSITOR* pCompositor = CrFbGetCompositor(pFb);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pEntry = CrFbEntryGetCompositorEntry(hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrVrScrCompositorEntryRegionsGet(pCompositor, pEntry, &cRects, &pRects, NULL, NULL);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync WARN(("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc));
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync cr_server.outputRedirect.CRORVisibleRegion(pVrdp, cRects, pRects);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpFrame(HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync void *pVrdp = CrFbDDataEntryGet(hEntry, slotGet());
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const VBOXVR_SCR_COMPOSITOR_ENTRY* pEntry = CrFbEntryGetCompositorEntry(hEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CR_TEXDATA *pTex = CrVrScrCompositorEntryTexGet(pEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = CrTdBltDataAcquire(pTex, GL_BGRA, !!(CrVrScrCompositorEntryFlagsGet(pEntry) & CRBLT_F_INVERT_SRC_YCOORDS), &pImg);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync cr_server.outputRedirect.CRORFrame(pVrdp, pImg->pvData, pImg->cbData);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpRegionsAll(struct CR_FRAMEBUFFER *pFb)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const struct VBOXVR_SCR_COMPOSITOR* pCompositor = CrFbGetCompositor(pFb);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CrVrScrCompositorConstIterInit(pCompositor, &Iter);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync while ((pEntry = CrVrScrCompositorConstIterNext(&Iter)) != NULL)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync HCR_FRAMEBUFFER_ENTRY hEntry = CrFbEntryFromCompositorEntry(pEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpSynchEntry(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpSyncEntryAll(struct CR_FRAMEBUFFER *pFb)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync const struct VBOXVR_SCR_COMPOSITOR* pCompositor = CrFbGetCompositor(pFb);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync CrVrScrCompositorConstIterInit(pCompositor, &Iter);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync while ((pEntry = CrVrScrCompositorConstIterNext(&Iter)) != NULL)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync HCR_FRAMEBUFFER_ENTRY hEntry = CrFbEntryFromCompositorEntry(pEntry);
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsyncint CrFbDisplayVrdp::vrdpCreate(HCR_FRAMEBUFFER hFb, HCR_FRAMEBUFFER_ENTRY hEntry)
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync /* Query supported formats. */
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync int rc = cr_server.outputRedirect.CRORContextProperty(cr_server.outputRedirect.pvContext,
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync if (RTStrStr(pachFormats, "H3DOR_FMT_RGBA_TOPDOWN"))
2c58a3c1c159c2fe32fdc0c82f1d30604fda0755vboxsync //vrdpFrame(hEntry);