Changeset 51551 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jun 5, 2014 12:09:12 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94201
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r51545 r51551 924 924 /** 925 925 * Handles display resize event. 926 * Disables access to VGA device;927 * calls the framebuffer RequestResize method;928 * if framebuffer resizes synchronously,929 * updates the display connector data and enables access to the VGA device.930 926 * 931 927 * @param w New display width … … 1025 1021 if (!maFramebuffers[uScreenId].pFramebuffer.isNull()) 1026 1022 { 1027 int rc = callFramebufferResize (maFramebuffers[uScreenId].pFramebuffer, uScreenId, 1028 pixelFormat, pvVRAM, bpp, cbLine, w, h); 1029 if (rc == VINF_VGA_RESIZE_IN_PROGRESS) 1030 { 1031 /* Immediately return to the caller. ResizeCompleted will be called back by the 1032 * GUI thread. The ResizeCompleted callback will change the resize status from 1033 * InProgress to UpdateDisplayData. The latter status will be checked by the 1034 * display timer callback on EMT and all required adjustments will be done there. 1035 */ 1036 return rc; 1037 } 1023 callFramebufferResize(maFramebuffers[uScreenId].pFramebuffer, uScreenId, 1024 pixelFormat, pvVRAM, bpp, cbLine, w, h); 1038 1025 } 1039 1026 … … 3649 3636 LogRelFlowFunc(("rc=%Rhrc\n", rc)); 3650 3637 return rc; 3651 }3652 3653 /**3654 * Notification that the framebuffer has completed the3655 * asynchronous resize processing3656 *3657 * @returns COM status code3658 */3659 STDMETHODIMP Display::ResizeCompleted(ULONG aScreenId)3660 {3661 LogRelFlowFunc(("\n"));3662 3663 /// @todo (dmik) can we AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); here?3664 // This will require general code review and may add some details.3665 // In particular, we may want to check whether EMT is really waiting for3666 // this notification, etc. It might be also good to obey the caller to make3667 // sure this method is not called from more than one thread at a time3668 // (and therefore don't use Display lock at all here to save some3669 // milliseconds).3670 AutoCaller autoCaller(this);3671 if (FAILED(autoCaller.rc())) return autoCaller.rc();3672 3673 /* this is only valid for external framebuffers */3674 if (maFramebuffers[aScreenId].pFramebuffer == NULL)3675 return setError(VBOX_E_NOT_SUPPORTED,3676 tr("Resize completed notification is valid only for external framebuffers"));3677 3678 /* Set the flag indicating that the resize has completed and display3679 * data need to be updated. */3680 bool f = ASMAtomicCmpXchgU32 (&maFramebuffers[aScreenId].u32ResizeStatus,3681 ResizeStatus_UpdateDisplayData, ResizeStatus_InProgress);3682 AssertRelease(f);NOREF(f);3683 3684 return S_OK;3685 3638 } 3686 3639
Note:
See TracChangeset
for help on using the changeset viewer.