VirtualBox

Changeset 25232 in vbox for trunk/src


Ignore:
Timestamp:
Dec 8, 2009 12:01:25 PM (15 years ago)
Author:
vboxsync
Message:

2d accel: fix the video playback black screen, some code cleaning. NetFlt/Adp/win: do not change security settings for ioctl device as it is not needed anymore

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r25226 r25232  
    24602460    {
    24612461        pProgram = calcProgram(pPrimary);
     2462        if(pProgram)
     2463        {
     2464            const VBoxVHWAColorKey *pResSrcCKey = getActiveSrcOverlayCKey();
     2465            const VBoxVHWAColorKey *pResDstCKey = getActiveDstOverlayCKey(pPrimary);
     2466
     2467            pProgram->start();
     2468            if(pResSrcCKey)
     2469            {
     2470                VBoxVHWASurfaceBase::setCKey(pProgram, &colorFormat(), pResSrcCKey, false);
     2471            }
     2472            if(pResDstCKey)
     2473            {
     2474                VBoxVHWASurfaceBase::setCKey(pProgram, &pPrimary->colorFormat(), pResDstCKey, true);
     2475            }
     2476            pProgram->stop();
     2477        }
    24622478    }
    24632479
     
    34393455int VBoxGLWidget::vhwaSurfaceBlt(struct _VBOXVHWACMD_SURF_BLT *pCmd)
    34403456{
    3441     /**/
    34423457    Q_UNUSED(pCmd);
    34433458    return VERR_NOT_IMPLEMENTED;
    3444 //    VBoxVHWASurfaceBase *pDstSurf = (VBoxVHWASurfaceBase*)pCmd->u.in.hDstSurf;
    3445 //    VBoxVHWASurfaceBase *pSrcSurf = (VBoxVHWASurfaceBase*)pCmd->u.in.hSrcSurf;
    3446 //    VBOXQGLLOG_ENTER(("pDstSurf (0x%x), pSrcSurf (0x%x)\n",pDstSurf,pSrcSurf));
    3447 //    QRect dstRect = VBOXVHWA_CONSTRUCT_QRECT_FROM_RECTL(&pCmd->u.in.dstRect);
    3448 //    QRect srcRect = VBOXVHWA_CONSTRUCT_QRECT_FROM_RECTL(&pCmd->u.in.srcRect);
    3449 //    vboxCheckUpdateAddress (pSrcSurf, pCmd->u.in.offSrcSurface);
    3450 //    vboxCheckUpdateAddress (pDstSurf, pCmd->u.in.offDstSurface);
    3451 ////    pDstSurf->makeCurrent();
    3452 ////    const VBoxVHWAColorKey DstCKey, *pDstCKey = NULL;
    3453 ////    const VBoxVHWAColorKey SrcCKey, *pSrcCKey = NULL;
    3454 ////    if(pCmd->u.in.flags & VBOXVHWA_BLT_KEYSRCOVERRIDE)
    3455 ////    {
    3456 ////        pSrcCKey = &
    3457 ////    }
    3458 ////    if(pCmd->u.in.flags & VBOXVHWA_BLT_KEYDESTOVERRIDE)
    3459 ////    {
    3460 ////
    3461 ////    }
    3462 //    if(pCmd->u.in.xUpdatedSrcMemValid)
    3463 //    {
    3464 //        QRect r = VBOXVHWA_CONSTRUCT_QRECT_FROM_RECTL(&pCmd->u.in.xUpdatedSrcMemRect);
    3465 //        pSrcSurf->updatedMem(&r);
    3466 //    }
    3467 //
    3468 //    return pDstSurf->blt(&dstRect, pSrcSurf, &srcRect,
    3469 //            pCmd->u.in.flags & VBOXVHWA_BLT_KEYSRCOVERRIDE ? &VBoxVHWAColorKey(pCmd->u.in.desc.SrcCK.high, pCmd->u.in.desc.SrcCK.low) : NULL,
    3470 //            pCmd->u.in.flags & VBOXVHWA_BLT_KEYDESTOVERRIDE ? &VBoxVHWAColorKey(pCmd->u.in.desc.DstCK.high, pCmd->u.in.desc.DstCK.low) : NULL);
    34713459}
    34723460
     
    34793467    vboxCheckUpdateAddress (pTargSurf, pCmd->u.in.offTargSurface);
    34803468
    3481 //    Assert(pTargSurf->isYInverted());
    3482 //    Assert(!pCurrSurf->isYInverted());
     3469
    34833470    if(pCmd->u.in.xUpdatedTargMemValid)
    34843471    {
     
    34933480    pTargSurf->cFlipsTarg++;
    34943481#endif
    3495 //    mDisplay.flip(pTargSurf, pCurrSurf);
    3496 //    Assert(!pTargSurf->isYInverted());
    3497 //    Assert(pCurrSurf->isYInverted());
     3482
    34983483    return VINF_SUCCESS;
    34993484}
     
    35013486void VBoxGLWidget::vhwaDoSurfaceOverlayUpdate(VBoxVHWASurfaceBase *pDstSurf, VBoxVHWASurfaceBase *pSrcSurf, struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE *pCmd)
    35023487{
     3488    /* get old values first to check whether we need to re-init display and program values */
     3489    bool bHadSrcCKey = false, bHadDstCKey = false;
     3490
     3491    if(pDstSurf)
     3492    {
     3493        bHadSrcCKey = !!(pSrcSurf->getActiveSrcOverlayCKey());
     3494        bHadDstCKey = !!(pSrcSurf->getActiveDstOverlayCKey(pDstSurf));
     3495    }
     3496
    35033497    if(pCmd->u.in.flags & VBOXVHWA_OVER_KEYDEST)
    35043498    {
     
    35763570        const VBoxVHWAColorKey *pResDstCKey = pSrcSurf->getActiveDstOverlayCKey(pDstSurf);
    35773571
    3578         /* @todo: may need to update glDisplayList here !! */
    3579         VBoxVHWAGlProgramVHWA *pProgram = pSrcSurf->getProgram(pDstSurf);
    3580         if(pProgram)
    3581         {
    3582             pProgram->start();
    3583             if(pResSrcCKey || pResDstCKey)
     3572        if(bHadSrcCKey != !!pResSrcCKey || bHadDstCKey != !!pResDstCKey)
     3573        {
     3574            pSrcSurf->setVisibilityReinitFlag();
     3575        }
     3576        else if(pResSrcCKey || pResDstCKey)
     3577        {
     3578            VBoxVHWAGlProgramVHWA *pProgram = pSrcSurf->getProgram(pDstSurf);
     3579            if(pProgram)
    35843580            {
     3581                pProgram->start();
    35853582                if(pResSrcCKey)
    35863583                {
     
    35913588                    VBoxVHWASurfaceBase::setCKey(pProgram, &pDstSurf->colorFormat(), pResDstCKey, true);
    35923589                }
    3593 
     3590                pProgram->stop();
    35943591            }
    3595 
    3596             switch(pSrcSurf->fourcc())
    3597             {
    3598                 case 0:
    3599                 case FOURCC_AYUV:
    3600                 case FOURCC_YV12:
    3601                     break;
    3602                 case FOURCC_UYVY:
    3603                 case FOURCC_YUY2:
    3604                     break;
    3605                 default:
    3606                     Assert(0);
    3607                     break;
    3608             }
    3609 
    3610             pProgram->stop();
    36113592        }
    36123593
    36133594        pSrcSurf->setRects(dstRect, srcRect);
    3614         pSrcSurf->setVisibilityReinitFlag();
     3595
    36153596    }
    36163597}
     
    41924173    VBOXQGL_SAVE_START(pSSM);
    41934174    int rc = SSMR3PutU32(pSSM, 0);         AssertRC(rc); /* 0 primaries */
    4194     rc = SSMR3PutU32(pSSM, 0);         AssertRC(rc); /* 0 overlays */
    41954175    VBOXQGL_SAVE_STOP(pSSM);
    41964176}
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c

    r25226 r25232  
    6262static PUCHAR vboxNetFltWinMpDbgGetOidName(ULONG oid);
    6363
     64#ifdef VBOXNETFLT_WITH_IOCTL_SECURITY
    6465NTSYSAPI
    6566NTSTATUS
     
    136137    return Status;
    137138}
     139#endif
    138140/**
    139141 * Register an ioctl interface - a device object to be used for this
     
    210212        if(Status == NDIS_STATUS_SUCCESS)
    211213        {
     214#ifdef VBOXNETFLT_WITH_IOCTL_SECURITY
    212215            /* NdisMRegisterDevice does not offers us the ability to set security attributes */
    213216            /* need to do this "manualy" for the device to be accessible by the non-privileged users */
     
    220223                Status = NDIS_STATUS_SUCCESS;
    221224            }
     225#endif
    222226
    223227            Status = ObReferenceObjectByPointer(g_pControlDeviceObject, FILE_READ_DATA, *IoFileObjectType, KernelMode);
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