VirtualBox

Changeset 51552 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 5, 2014 12:33:13 PM (11 years ago)
Author:
vboxsync
Message:

Main: removed obsolete GetFramebuffer, updateDisplayData methods.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r51551 r51552  
    193193    int notifyCroglResize(const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM);
    194194
    195     IFramebuffer *getFramebuffer()
    196     {
    197         return maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN].pFramebuffer;
    198     }
    199195    void getFramebufferDimensions(int32_t *px1, int32_t *py1, int32_t *px2, int32_t *py2);
    200196    int getScreenResolution(uint32_t cScreen, ULONG *pcx, ULONG *pcy,
     
    229225    STDMETHOD(QueryFramebuffer)(ULONG aScreenId,
    230226                                IFramebuffer **aFramebuffer);
    231     STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin);
    232227    STDMETHOD(SetVideoModeHint)(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel);
    233228    STDMETHOD(TakeScreenShot)(ULONG aScreenId, BYTE *address, ULONG width, ULONG height);
     
    250245    HRESULT querySourceBitmap(ULONG aScreenId,
    251246                              IDisplaySourceBitmap **ppDisplaySourceBitmap);
    252     int updateDisplayData(void);
    253247
    254248#ifdef VBOX_WITH_CRHGSMI
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r51525 r51552  
    73667366        LogFlowThisFunc(("Stopping VRDP server...\n"));
    73677367
    7368         /* Leave the lock since EMT will call us back as addVMCaller()
    7369          * in updateDisplayData(). */
     7368        /* Leave the lock since EMT could call us back as addVMCaller() */
    73707369        alock.release();
    73717370
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r51551 r51552  
    25272527    if (mpDrv)
    25282528    {
    2529         /* Setup the new framebuffer, the resize will lead to an updateDisplayData call. */
     2529        /* Setup the new framebuffer. */
    25302530
    25312531#if defined(VBOX_WITH_CROGL)
     
    26242624    if (!pFBInfo->pFramebuffer.isNull())
    26252625        pFBInfo->pFramebuffer->AddRef();
    2626 
    2627     return S_OK;
    2628 }
    2629 
    2630 STDMETHODIMP Display::GetFramebuffer(ULONG aScreenId,
    2631                                      IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin)
    2632 {
    2633     LogRelFlowFunc(("aScreenId=%ld\n", aScreenId));
    2634 
    2635     CheckComArgOutPointerValid(aFramebuffer);
    2636 
    2637     AutoCaller autoCaller(this);
    2638     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    2639 
    2640     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    2641 
    2642     if (aScreenId != 0 && aScreenId >= mcMonitors)
    2643         return E_INVALIDARG;
    2644 
    2645     /** @todo This should be actually done on EMT. */
    2646     DISPLAYFBINFO *pFBInfo = &maFramebuffers[aScreenId];
    2647     AssertPtr(pFBInfo);
    2648 
    2649     *aFramebuffer = pFBInfo->pFramebuffer; /** @todo r=andy Race prone? Use a ComPtr instead? */
    2650     if (*aFramebuffer)
    2651         (*aFramebuffer)->AddRef();
    2652     if (aXOrigin)
    2653         *aXOrigin = pFBInfo->xOrigin;
    2654     if (aYOrigin)
    2655         *aYOrigin = pFBInfo->yOrigin;
    26562626
    26572627    return S_OK;
     
    37793749}
    37803750
    3781 /**
    3782  *  Helper to update the display information from the framebuffer.
    3783  *
    3784  *  @thread EMT
    3785  */
    3786 int Display::updateDisplayData(void)
    3787 {
    3788     LogRelFlowFunc(("\n"));
    3789 
    3790     /* the driver might not have been constructed yet */
    3791     if (!mpDrv)
    3792         return VINF_SUCCESS;
    3793 
    3794 #ifdef VBOX_STRICT
    3795     /*
    3796      *  Sanity check. Note that this method may be called on EMT after Console
    3797      *  has started the power down procedure (but before our #drvDestruct() is
    3798      *  called, in which case pVM will already be NULL but mpDrv will not). Since
    3799      *  we don't really need pVM to proceed, we avoid this check in the release
    3800      *  build to save some ms (necessary to construct SafeVMPtrQuiet) in this
    3801      *  time-critical method.
    3802      */
    3803     Console::SafeVMPtrQuiet ptrVM(mParent);
    3804     if (ptrVM.isOk())
    3805     {
    3806         PVM pVM = VMR3GetVM(ptrVM.rawUVM());
    3807         Assert(VM_IS_EMT(pVM));
    3808     }
    3809 #endif
    3810 
    3811     /* The method is only relevant to the primary framebuffer. */
    3812     IFramebuffer *pFramebuffer = maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN].pFramebuffer;
    3813 
    3814     if (pFramebuffer)
    3815     {
    3816         HRESULT rc;
    3817         BYTE *address = 0;
    3818         rc = pFramebuffer->COMGETTER(Address) (&address);
    3819         AssertComRC (rc);
    3820         ULONG bytesPerLine = 0;
    3821         rc = pFramebuffer->COMGETTER(BytesPerLine) (&bytesPerLine);
    3822         AssertComRC (rc);
    3823         ULONG bitsPerPixel = 0;
    3824         rc = pFramebuffer->COMGETTER(BitsPerPixel) (&bitsPerPixel);
    3825         AssertComRC (rc);
    3826         ULONG width = 0;
    3827         rc = pFramebuffer->COMGETTER(Width) (&width);
    3828         AssertComRC (rc);
    3829         ULONG height = 0;
    3830         rc = pFramebuffer->COMGETTER(Height) (&height);
    3831         AssertComRC (rc);
    3832 
    3833         if (   (width  != mLastWidth  && mLastWidth != 0)
    3834             || (height != mLastHeight && mLastHeight != 0))
    3835         {
    3836             LogRel(("updateDisplayData: size mismatch w %d(%d) h %d(%d)\n",
    3837                     width, mLastWidth, height, mLastHeight));
    3838             return VERR_INVALID_STATE;
    3839         }
    3840 
    3841         mpDrv->IConnector.pu8Data = (uint8_t *) address;
    3842         mpDrv->IConnector.cbScanline = bytesPerLine;
    3843         mpDrv->IConnector.cBits = bitsPerPixel;
    3844         mpDrv->IConnector.cx = width;
    3845         mpDrv->IConnector.cy = height;
    3846     }
    3847     else
    3848     {
    3849         /* black hole */
    3850         mpDrv->IConnector.pu8Data = NULL;
    3851         mpDrv->IConnector.cbScanline = 0;
    3852         mpDrv->IConnector.cBits = 0;
    3853         mpDrv->IConnector.cx = 0;
    3854         mpDrv->IConnector.cy = 0;
    3855     }
    3856     LogRelFlowFunc(("leave\n"));
    3857     return VINF_SUCCESS;
    3858 }
    3859 
    38603751#if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL)
    38613752int Display::crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height)
     
    39693860    if (that->mpDrv)
    39703861    {
    3971         /* Setup the new framebuffer, the resize will lead to an updateDisplayData call. */
     3862        /* Setup the new framebuffer. */
    39723863        DISPLAYFBINFO *pFBInfo = &that->maFramebuffers[uScreenId];
    39733864
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