VirtualBox

Changeset 54828 in vbox


Ignore:
Timestamp:
Mar 18, 2015 11:43:37 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99030
Message:

Main,Frontends: use BitmapFormat in API.

Location:
trunk/src/VBox
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp

    r52574 r54828  
    337337}
    338338
    339 STDMETHODIMP VBoxSDLFB::COMGETTER(PixelFormat) (ULONG *pixelFormat)
     339STDMETHODIMP VBoxSDLFB::COMGETTER(PixelFormat) (BitmapFormat_T *pixelFormat)
    340340{
    341341    if (!pixelFormat)
     
    656656        ULONG ulBitsPerPixel = 0;
    657657        ULONG ulBytesPerLine = 0;
    658         ULONG ulPixelFormat = 0;
     658        BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    659659
    660660        mpSourceBitmap->QueryBitmapInfo(&pAddress,
     
    663663                                        &ulBitsPerPixel,
    664664                                        &ulBytesPerLine,
    665                                         &ulPixelFormat);
     665                                        &bitmapFormat);
    666666
    667667        if (   mGuestXRes    == ulWidth
  • trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h

    r52574 r54828  
    7676    STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *bitsPerPixel);
    7777    STDMETHOD(COMGETTER(BytesPerLine))(ULONG *bytesPerLine);
    78     STDMETHOD(COMGETTER(PixelFormat)) (ULONG *pixelFormat);
     78    STDMETHOD(COMGETTER(PixelFormat)) (BitmapFormat_T *pixelFormat);
    7979    STDMETHOD(COMGETTER(HeightReduction)) (ULONG *heightReduction);
    8080    STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r54805 r54828  
    181181    STDMETHOD(COMGETTER(BitsPerPixel))(ULONG *puBitsPerPixel);
    182182    STDMETHOD(COMGETTER(BytesPerLine))(ULONG *puBytesPerLine);
    183     STDMETHOD(COMGETTER(PixelFormat))(ULONG *puPixelFormat);
     183    STDMETHOD(COMGETTER(PixelFormat))(BitmapFormat_T *puPixelFormat);
    184184    STDMETHOD(COMGETTER(HeightReduction))(ULONG *puHeightReduction);
    185185    STDMETHOD(COMGETTER(Overlay))(IFramebufferOverlay **ppOverlay);
     
    658658}
    659659
    660 STDMETHODIMP UIFrameBufferPrivate::COMGETTER(PixelFormat)(ULONG *puPixelFormat)
     660STDMETHODIMP UIFrameBufferPrivate::COMGETTER(PixelFormat)(BitmapFormat_T *puPixelFormat)
    661661{
    662662    if (!puPixelFormat)
    663663        return E_POINTER;
    664     *puPixelFormat = pixelFormat();
     664    *puPixelFormat = (BitmapFormat_T)pixelFormat();
    665665    return S_OK;
    666666}
     
    11811181        ULONG ulBitsPerPixel = 0;
    11821182        ULONG ulBytesPerLine = 0;
    1183         ULONG ulPixelFormat = 0;
     1183        KBitmapFormat bitmapFormat = KBitmapFormat_Opaque;
    11841184        m_sourceBitmap.QueryBitmapInfo(pAddress,
    11851185                                       ulWidth,
     
    11871187                                       ulBitsPerPixel,
    11881188                                       ulBytesPerLine,
    1189                                        ulPixelFormat);
     1189                                       bitmapFormat);
    11901190        Assert(ulBitsPerPixel == 32);
    11911191
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r54809 r54828  
    13301330  <enum
    13311331    name="BitmapFormat"
    1332     uuid="2526302a-cd88-4491-8637-ae50b9804fbc"
     1332    uuid="afb2bf39-8b1e-4f9f-8948-d1b887f83eb0"
    13331333    >
    13341334    <desc>
     
    13451345    <const name="BGR"             value="0x20524742">
    13461346      <desc>
    1347         Generic BGR format. Pixel layout depends on the number of bits per pixel.
     1347        Generic BGR format without alpha channel.
     1348        Pixel layout depends on the number of bits per pixel:
     1349        <ul>
     1350          <li>
     1351            <b>32</b> - bits 31:24 undefined, bits 23:16 R, bits 15:8 G, bits 7:0 B.
     1352          </li>
     1353
     1354          <li>
     1355            <b>16</b> - bits 15:11 R, bits 10:5 G, bits 4:0 B.
     1356          </li>
     1357        </ul>
    13481358      </desc>
    13491359    </const>
     
    13661376      <desc>
    13671377        PNG image.
     1378      </desc>
     1379    </const>
     1380    <const name="JPEG"            value="0x4745504A">
     1381      <desc>
     1382        JPEG image.
    13681383      </desc>
    13691384    </const>
     
    1550615521  <interface
    1550715522    name="IDisplaySourceBitmap" extends="$unknown" wsmap="suppress"
    15508     uuid="b00907f7-d85e-4dce-b1a6-16a2d91b0269"
     15523    uuid="0b78daeb-f52f-43b9-99e8-4a3c226cbe2d"
    1550915524    >
    1551015525    <attribute name="screenId" type="unsigned long" readonly="yes"/>
     
    1551615531      <param name="bitsPerPixel" type="unsigned long" dir="out"/>
    1551715532      <param name="bytesPerLine" type="unsigned long" dir="out"/>
    15518       <param name="pixelFormat" type="unsigned long" dir="out"/>
     15533      <param name="bitmapFormat" type="BitmapFormat" dir="out"/>
    1551915534    </method>
    1552015535
     
    1555015565  <interface
    1555115566    name="IFramebuffer" extends="$unknown"
    15552     uuid="735365aa-544d-415c-a25b-a5ea913d63f3"
     15567    uuid="dd07f843-be2e-4cae-83fe-8bf5d33c80e9"
    1555315568    wsmap="managed"
    1555415569    >
     
    1557315588    </attribute>
    1557415589
    15575     <attribute name="pixelFormat" type="unsigned long" readonly="yes">
     15590    <attribute name="pixelFormat" type="BitmapFormat" readonly="yes">
    1557615591      <desc>
    1557715592        Frame buffer pixel format. It's one of the values defined by <link
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r54582 r54828  
    532532                                    ULONG *aBitsPerPixel,
    533533                                    ULONG *aBytesPerLine,
    534                                     ULONG *aPixelFormat);
     534                                    BitmapFormat_T *aBitmapFormat);
    535535
    536536    int initSourceBitmap(unsigned aScreenId, DISPLAYFBINFO *pFBInfo);
     
    549549        ULONG ulBitsPerPixel;
    550550        ULONG ulBytesPerLine;
    551         ULONG ulPixelFormat;
     551        BitmapFormat_T bitmapFormat;
    552552    };
    553553
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r54231 r54828  
    10971097        ULONG ulBitsPerPixel = 0;
    10981098        ULONG ulBytesPerLine = 0;
    1099         ULONG ulPixelFormat = 0;
     1099        BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    11001100
    11011101        hr = server->maSourceBitmaps[uScreenId]->QueryBitmapInfo(&pAddress,
     
    11041104                                                                 &ulBitsPerPixel,
    11051105                                                                 &ulBytesPerLine,
    1106                                                                  &ulPixelFormat);
     1106                                                                 &bitmapFormat);
    11071107
    11081108        if (SUCCEEDED(hr))
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r54616 r54828  
    933933            ULONG ulBitsPerPixel = 0;
    934934            ULONG ulBytesPerLine = 0;
    935             ULONG ulPixelFormat = 0;
     935            BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    936936
    937937            hr = pSourceBitmap->QueryBitmapInfo(&pAddress,
     
    940940                                                &ulBitsPerPixel,
    941941                                                &ulBytesPerLine,
    942                                                 &ulPixelFormat);
     942                                                &bitmapFormat);
    943943            if (SUCCEEDED(hr))
    944944            {
     
    24072407                    ULONG ulBitsPerPixel = 0;
    24082408                    ULONG ulBytesPerLine = 0;
    2409                     ULONG ulPixelFormat = 0;
     2409                    BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    24102410
    24112411                    HRESULT hrc = pFBInfo->pSourceBitmap->QueryBitmapInfo(&pAddress,
     
    24142414                                                                          &ulBitsPerPixel,
    24152415                                                                          &ulBytesPerLine,
    2416                                                                           &ulPixelFormat);
     2416                                                                          &bitmapFormat);
    24172417                    if (SUCCEEDED(hrc))
    24182418                    {
     
    25462546                    ULONG ulBitsPerPixel = 0;
    25472547                    ULONG ulBytesPerLine = 0;
    2548                     ULONG ulPixelFormat = 0;
     2548                    BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    25492549
    25502550                    HRESULT hrc = pFBInfo->pSourceBitmap->QueryBitmapInfo(&pAddress,
     
    25532553                                                                          &ulBitsPerPixel,
    25542554                                                                          &ulBytesPerLine,
    2555                                                                           &ulPixelFormat);
     2555                                                                          &bitmapFormat);
    25562556                    if (SUCCEEDED(hrc))
    25572557                    {
     
    27582758                ULONG ulBitsPerPixel = 0;
    27592759                ULONG ulBytesPerLine = 0;
    2760                 ULONG ulPixelFormat = 0;
     2760                BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    27612761
    27622762                obj->QueryBitmapInfo(&pAddress,
     
    27652765                                     &ulBitsPerPixel,
    27662766                                     &ulBytesPerLine,
    2767                                      &ulPixelFormat);
     2767                                     &bitmapFormat);
    27682768
    27692769                mpDrv->IConnector.pu8Data    = pAddress;
     
    37853785            ULONG ulBitsPerPixel = 0;
    37863786            ULONG ulBytesPerLine = 0;
    3787             ULONG ulPixelFormat = 0;
     3787            BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    37883788
    37893789            HRESULT hrc = pFBInfo->pSourceBitmap->QueryBitmapInfo(&pAddress,
     
    37923792                                                                  &ulBitsPerPixel,
    37933793                                                                  &ulBytesPerLine,
    3794                                                                   &ulPixelFormat);
     3794                                                                  &bitmapFormat);
    37953795            if (SUCCEEDED(hrc))
    37963796            {
  • trunk/src/VBox/Main/src-client/DisplaySourceBitmapImpl.cpp

    r51436 r54828  
    5858    m.ulBitsPerPixel = 0;
    5959    m.ulBytesPerLine = 0;
    60     m.ulPixelFormat = 0;
     60    m.bitmapFormat = BitmapFormat_Opaque;
    6161
    6262    int rc = initSourceBitmap(uScreenId, pFBInfo);
     
    100100                                             ULONG *aBitsPerPixel,
    101101                                             ULONG *aBytesPerLine,
    102                                              ULONG *aPixelFormat)
     102                                             BitmapFormat_T *aBitmapFormat)
    103103{
    104104    HRESULT hr = S_OK;
     
    110110    *aBitsPerPixel = m.ulBitsPerPixel;
    111111    *aBytesPerLine = m.ulBytesPerLine;
    112     *aPixelFormat  = m.ulPixelFormat;
     112    *aBitmapFormat  = m.bitmapFormat;
    113113
    114114    return hr;
     
    130130    ULONG ulBitsPerPixel = 0;
    131131    ULONG ulBytesPerLine = 0;
    132     ULONG ulPixelFormat = 0;
     132    BitmapFormat_T bitmapFormat = BitmapFormat_Opaque;
    133133
    134134    if (pFBInfo->pu8FramebufferVRAM && pFBInfo->u16BitsPerPixel == 32)
     
    141141        ulBitsPerPixel = pFBInfo->u16BitsPerPixel;
    142142        ulBytesPerLine = pFBInfo->u32LineSize;
    143         ulPixelFormat  = 0;
     143        bitmapFormat   = BitmapFormat_BGR;
    144144        m.pu8Allocated = NULL;
    145145    }
     
    153153        ulBitsPerPixel = 32;
    154154        ulBytesPerLine = ulWidth * 4;
    155         ulPixelFormat  = 0;
     155        bitmapFormat   = BitmapFormat_BGR;
    156156
    157157        m.pu8Allocated = (uint8_t *)RTMemAlloc(ulBytesPerLine * ulHeight);
     
    173173        m.ulBitsPerPixel = ulBitsPerPixel;
    174174        m.ulBytesPerLine = ulBytesPerLine;
    175         m.ulPixelFormat = ulPixelFormat;
     175        m.bitmapFormat = bitmapFormat;
    176176    }
    177177
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