VirtualBox

Changeset 44999 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 11, 2013 4:57:48 PM (12 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: no need for 64-bit maths here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r44528 r44999  
    5555#include <VBox/VBoxVideoGuest.h>
    5656#include <VBox/VBoxVideo.h>
    57 #include <iprt/asm-math.h>
    5857
    5958#ifdef DEBUG
     
    259258static inline int32_t vboxLineLength(ScrnInfoPtr pScrn, int32_t cDisplayWidth)
    260259{
    261     uint64_t cbLine = ((uint64_t)cDisplayWidth * vboxBPP(pScrn) / 8 + 3) & ~3;
     260    uint32_t cbLine = (cDisplayWidth * vboxBPP(pScrn) / 8 + 3) & ~3;
    262261    return cbLine < INT32_MAX ? cbLine : INT32_MAX;
    263262}
     
    266265static inline int32_t vboxDisplayPitch(ScrnInfoPtr pScrn, int32_t cbLine)
    267266{
    268     /* take care not to reference __udivdi3! */
    269     return ASMDivU64ByU32RetU32((uint64_t)cbLine * 8, vboxBPP(pScrn));
     267    return cbLine * 8 / vboxBPP(pScrn);
    270268}
    271269
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