VirtualBox

Ignore:
Timestamp:
Aug 21, 2007 12:06:02 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23767
Message:

Completed DrvDeriveSurface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/enable.c

    r4125 r4257  
    3030    {   INDEX_DrvOffset,                (PFN) DrvOffset             },  //  6
    3131    {   INDEX_DrvDisableDriver,         (PFN) DrvDisableDriver      },  //  8
     32    {   INDEX_DrvCreateDeviceBitmap,    (PFN) DrvCreateDeviceBitmap },  // 10
     33    {   INDEX_DrvDeleteDeviceBitmap,    (PFN) DrvDeleteDeviceBitmap },  // 11
    3234    {   INDEX_DrvRealizeBrush,          (PFN) DrvRealizeBrush       },  // 12
    3335    {   INDEX_DrvDitherColor,           (PFN) DrvDitherColor        },  // 13
     
    230232    {   INDEX_DrvAssertMode,            (PFN) DrvAssertMode         },  //  5 0x5
    231233    {   INDEX_DrvDisableDriver,         (PFN) DrvDisableDriver      },  //  8 0x8
     234    {   INDEX_DrvCreateDeviceBitmap,    (PFN) DrvCreateDeviceBitmap },  // 10
     235    {   INDEX_DrvDeleteDeviceBitmap,    (PFN) DrvDeleteDeviceBitmap },  // 11
    232236    {   INDEX_DrvRealizeBrush,          (PFN) DrvRealizeBrush       },  // 12 0xc
    233237    {   INDEX_DrvDitherColor,           (PFN) DrvDitherColor        },  // 13 0xd
     
    913917}
    914918
     919/******************************Public*Routine**********************************\
     920 * HBITMAP DrvCreateDeviceBitmap
     921 *
     922 * Function called by GDI to create a device-format-bitmap (DFB).  We will
     923 * always try to allocate the bitmap in off-screen; if we can't, we simply
     924 * fail the call and GDI will create and manage the bitmap itself.
     925 *
     926 * Note: We do not have to zero the bitmap bits.  GDI will automatically
     927 *       call us via DrvBitBlt to zero the bits (which is a security
     928 *       consideration).
     929 *
     930\******************************************************************************/
     931
     932HBITMAP
     933DrvCreateDeviceBitmap(
     934    DHPDEV      dhpdev,
     935    SIZEL       sizl,
     936    ULONG       iFormat)
     937{
     938    DISPDBG((0, "DISP DrvCreateDeviceBitmap %x (%d,%d) %x\n", dhpdev, sizl.cx, sizl.cy, iFormat));
     939    /* Let GDI manage the bitmap */
     940    return (HBITMAP)0;
     941}
     942
     943/******************************Public*Routine**********************************\
     944 * VOID DrvDeleteDeviceBitmap
     945 *
     946 * Deletes a DFB.
     947 *
     948\******************************************************************************/
     949
     950VOID
     951DrvDeleteDeviceBitmap(
     952    DHSURF      dhsurf)
     953{
     954    DISPDBG((0, "DISP DrvDeleteDeviceBitmap %x", dhsurf));
     955}
     956
    915957/******************************Public*Routine******************************\
    916958* DrvGetModes
     
    10981140{
    10991141    PPDEV               pDev = (PPDEV)pDirectDraw->dhpdev;
    1100 //    HBITMAP             hbmDevice;
     1142    HBITMAP             hbmDevice;
    11011143    DD_SURFACE_GLOBAL*  pSurfaceGlobal;
    1102 //    SIZEL               sizl;
    11031144
    11041145    DISPDBG((0, "%s: %p\n", __FUNCTION__, pDev));
     
    11121153    AssertMsg(!(pSurfaceGlobal->ddpfSurface.dwFlags & DDPF_FOURCC), ("GDI called us with a non-RGB surface!"));
    11131154
    1114 #if 0
    11151155    // The GDI driver does not accelerate surfaces in AGP memory,
    11161156    // thus we fail the call
     
    11481188        DWORD ulBitmapType, flHooks;       
    11491189
    1150         sizl.cx = pSurfaceGlobal->wWidth;
    1151         sizl.cy = pSurfaceGlobal->wHeight;
     1190        sizel.cx = pSurfaceGlobal->wWidth;
     1191        sizel.cy = pSurfaceGlobal->wHeight;
    11521192
    11531193        if (pDev->ulBitCount == 8)
    11541194        {
    1155             if (!bInit256ColorPalette(pDev)) {
    1156                 DISPDBG((0, "DISP DrvEnableSurface failed to init the 8bpp palette\n"));
    1157                 return(FALSE);
    1158             }
    11591195            ulBitmapType = BMF_8BPP;
    11601196            flHooks = HOOKS_BMF8BPP;
     
    11761212        }
    11771213
    1178         hbmDevice = EngCreateBitmap(sizl,
     1214        hbmDevice = EngCreateBitmap(sizel,
    11791215                                    pDev->lDeltaScreen,
    11801216                                    ulBitmapType,
     
    12181254    DISPDBG((0, "DrvDeriveSurface return NULL"));
    12191255    DISPDBG((0, "pSurfaceGlobal->ddpfSurface.dwRGBBitCount = %d, lPitch =%ld", pSurfaceGlobal->ddpfSurface.dwRGBBitCount,pSurfaceGlobal->lPitch));
    1220 #endif
    12211256   
    12221257    return(0);
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