VirtualBox

Changeset 3761 in vbox for trunk/src/VBox/Frontends/VBoxBFE


Ignore:
Timestamp:
Jul 22, 2007 10:43:14 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23084
Message:

Main/Frontends: Cleaned up IFramebuffer interface.

Location:
trunk/src/VBox/Frontends/VBoxBFE
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp

    r3670 r3761  
    308308 *
    309309 * @returns COM status code
    310  * @param colorDepth Address of result variable.
    311  */
    312 uint32_t VMDisplay::getColorDepth()
     310 * @param bitsPerPixel Address of result variable.
     311 */
     312uint32_t VMDisplay::getBitsPerPixel()
    313313{
    314314    Assert(mpDrv);
     
    409409        mFramebuffer->getAddress ((uintptr_t *)&mpDrv->Connector.pu8Data);
    410410        mFramebuffer->getLineSize ((ULONG*)&mpDrv->Connector.cbScanline);
    411         mFramebuffer->getColorDepth ((ULONG*)&mpDrv->Connector.cBits);
     411        mFramebuffer->getBitsPerPixel ((ULONG*)&mpDrv->Connector.cBits);
    412412        mFramebuffer->getWidth ((ULONG*)&mpDrv->Connector.cx);
    413413        mFramebuffer->getHeight ((ULONG*)&mpDrv->Connector.cy);
     
    426426    {
    427427        mFramebuffer->getAddress ((uintptr_t *)&mpDrv->Connector.pu8Data);
    428         mFramebuffer->getColorDepth ((ULONG*)&mpDrv->Connector.cBits);
     428        mFramebuffer->getBitsPerPixel ((ULONG*)&mpDrv->Connector.cBits);
    429429        mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort,
    430430                                          !!(mpDrv->Connector.pu8Data != (uint8_t*)~0UL));
     
    824824}
    825825
    826 void VMDisplay::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth, ULONG aDisplay)
     826void VMDisplay::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay)
    827827{
    828828    PPDMIVMMDEVPORT pVMMDevPort = gVMMDev->getVMMDevPort ();
    829829
    830830    if (pVMMDevPort)
    831         pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, aWidth, aHeight, aColorDepth, aDisplay);
     831        pVMMDevPort->pfnRequestDisplayChange(pVMMDevPort, aWidth, aHeight, aBitsPerPixel, aDisplay);
    832832}
    833833
  • trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h

    r3110 r3761  
    4747
    4848    void updatePointerShape(bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t width, uint32_t height, void *pShape);
    49     void SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth, ULONG aDisplay);
     49    void SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay);
    5050
    5151    static const PDMDRVREG  DrvReg;
     
    5353    uint32_t getWidth();
    5454    uint32_t getHeight();
    55     uint32_t getColorDepth();
     55    uint32_t getBitsPerPixel();
    5656
    5757    STDMETHODIMP RegisterExternalFramebuffer(Framebuffer *Framebuffer);
  • trunk/src/VBox/Frontends/VBoxBFE/Framebuffer.h

    r3576 r3761  
    4242    virtual HRESULT Unlock() = 0;
    4343    virtual HRESULT getAddress(uintptr_t *address) = 0;
    44     virtual HRESULT getColorDepth(ULONG *colorDepth) = 0;
     44    virtual HRESULT getBitsPerPixel(ULONG *bitsPerPixel) = 0;
    4545    virtual HRESULT getLineSize(ULONG *lineSize) = 0;
    4646    virtual HRESULT NotifyUpdate(ULONG x, ULONG y,
  • trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp

    r3701 r3761  
    185185 *
    186186 * @returns COM status code
    187  * @param   colorDepth Address of result variable
    188  */
    189 HRESULT SDLFramebuffer::getColorDepth(ULONG *colorDepth)
    190 {
    191     LogFlow(("SDLFramebuffer::GetColorDepth\n"));
    192 
    193     if (!colorDepth)
     187 * @param   bitsPerPixel Address of result variable
     188 */
     189HRESULT SDLFramebuffer::getBitsPerPixel(ULONG *bitsPerPixel)
     190{
     191    LogFlow(("SDLFramebuffer::GetBitsPerPixel\n"));
     192
     193    if (!bitsPerPixel)
    194194        return E_INVALIDARG;
    195     *colorDepth = (ULONG)(mScreen ? mScreen->format->BitsPerPixel : 0);
     195    *bitsPerPixel = (ULONG)(mScreen ? mScreen->format->BitsPerPixel : 0);
    196196    return S_OK;
    197197}
  • trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.h

    r3669 r3761  
    4848    virtual HRESULT Unlock();
    4949    virtual HRESULT getAddress(uintptr_t *address);
    50     virtual HRESULT getColorDepth(ULONG *colorDepth);
     50    virtual HRESULT getBitsPerPixel(ULONG *bitsPerPixel);
    5151    virtual HRESULT getLineSize(ULONG *lineSize);
    5252    virtual HRESULT NotifyUpdate(ULONG x, ULONG y,
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r3670 r3761  
    729729    if (g_u32VRamSizeMB * _1M >=   gFramebuffer->getHostXres()
    730730                          * gFramebuffer->getHostYres()
    731                           * (gDisplay->getColorDepth() / 8))
     731                          * (gDisplay->getBitsPerPixel() / 8))
    732732        gDisplay->SetVideoModeHint(gFramebuffer->getHostXres(), gFramebuffer->getHostYres(), 0, 0);
    733733#endif
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