VirtualBox

Changeset 64425 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Oct 26, 2016 7:26:46 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111545
Message:

bugref:8614: Additions/common/VBoxVideo: make the code more self-contained: remove final dependencies on vboxguest in vboxvideo.

Location:
trunk/src/VBox/Additions/common/VBoxVideo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp

    r64337 r64425  
    2323#ifndef VBOX_GUESTR3XF86MOD
    2424# include <iprt/string.h>
     25#endif
     26
     27#ifndef LINUX_VERSION_CODE
     28# define VBVOAssertPtr AssertPtr
     29#else
     30# define VBVOAssertPtr(a) do {} while(0)
    2531#endif
    2632
     
    330336{
    331337    int rc;
    332     AssertPtrReturn(paHints, VERR_INVALID_POINTER);
     338    VBVOAssertPtr(paHints);
     339    if (!VALID_PTR(paHints))
     340        return VERR_INVALID_POINTER;
    333341    void *p = VBoxHGSMIBufferAlloc(pCtx,   sizeof(VBVAQUERYMODEHINTS)
    334342                                         + cScreens * sizeof(VBVAMODEHINT),
  • trunk/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp

    r64156 r64425  
    2121#include <VBox/err.h>
    2222// #include <VBox/log.h>
    23 #include <iprt/assert.h>
     23#ifndef LINUX_VERSION_CODE
     24# include <iprt/assert.h>
     25# define VBVOAssert Assert
     26#else
     27# define VBVOAssert(a) do {} while(0)
     28#endif
    2429#include <iprt/string.h>
    2530
     
    164169        uint32_t indexRecordNext;
    165170
    166         Assert(!pCtx->fHwBufferOverflow);
    167         Assert(pCtx->pRecord == NULL);
     171        VBVOAssert(!pCtx->fHwBufferOverflow);
     172        VBVOAssert(pCtx->pRecord == NULL);
    168173
    169174        indexRecordNext = (pCtx->pVBVA->indexRecordFree + 1) % VBVA_MAX_RECORDS;
     
    208213    // LogFunc(("\n"));
    209214
    210     Assert(pCtx->pVBVA);
     215    VBVOAssert(pCtx->pVBVA);
    211216
    212217    pRecord = pCtx->pRecord;
    213     Assert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
     218    VBVOAssert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
    214219
    215220    /* Mark the record completed. */
     
    290295
    291296    VBVABUFFER *pVBVA = pCtx->pVBVA;
    292     Assert(pVBVA);
     297    VBVOAssert(pVBVA);
    293298
    294299    if (!pVBVA || pCtx->fHwBufferOverflow)
     
    297302    }
    298303
    299     Assert(pVBVA->indexRecordFirst != pVBVA->indexRecordFree);
     304    VBVOAssert(pVBVA->indexRecordFirst != pVBVA->indexRecordFree);
    300305
    301306    pRecord = pCtx->pRecord;
    302     Assert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
     307    VBVOAssert(pRecord && (pRecord->cbRecord & VBVA_F_RECORD_PARTIAL));
    303308
    304309    // LogFunc(("%d\n", cb));
     
    330335                    // LogFunc(("Buffer overflow!!!\n"));
    331336                    pCtx->fHwBufferOverflow = true;
    332                     Assert(false);
     337                    VBVOAssert(false);
    333338                    return false;
    334339                }
     
    338343        }
    339344
    340         Assert(cbChunk <= cb);
    341         Assert(cbChunk <= vboxHwBufferAvail (pVBVA));
     345        VBVOAssert(cbChunk <= cb);
     346        VBVOAssert(cbChunk <= vboxHwBufferAvail (pVBVA));
    342347
    343348        vboxHwBufferPlaceDataAt (pCtx, (uint8_t *)p + cbWritten, cbChunk, pVBVA->off32Free);
Note: See TracChangeset for help on using the changeset viewer.

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