Changeset 30347 in vbox for trunk/src/VBox
- Timestamp:
- Jun 21, 2010 5:44:06 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r30291 r30347 110 110 111 111 UIMachineView* UIMachineView::create( UIMachineWindow *pMachineWindow 112 , VBoxDefs::RenderMode renderMode113 112 #ifdef VBOX_WITH_VIDEOHWACCEL 114 113 , bool bAccelerate2DVideo … … 122 121 case UIVisualStateType_Normal: 123 122 view = new UIMachineViewNormal( pMachineWindow 124 , renderMode125 123 #ifdef VBOX_WITH_VIDEOHWACCEL 126 124 , bAccelerate2DVideo … … 130 128 case UIVisualStateType_Fullscreen: 131 129 view = new UIMachineViewFullscreen( pMachineWindow 132 , renderMode133 130 #ifdef VBOX_WITH_VIDEOHWACCEL 134 131 , bAccelerate2DVideo … … 138 135 case UIVisualStateType_Seamless: 139 136 view = new UIMachineViewSeamless( pMachineWindow 140 , renderMode141 137 #ifdef VBOX_WITH_VIDEOHWACCEL 142 138 , bAccelerate2DVideo … … 196 192 197 193 UIMachineView::UIMachineView( UIMachineWindow *pMachineWindow 198 , VBoxDefs::RenderMode renderMode199 194 #ifdef VBOX_WITH_VIDEOHWACCEL 200 195 , bool bAccelerate2DVideo … … 205 200 : QAbstractScrollArea(pMachineWindow->machineWindow()) 206 201 , m_pMachineWindow(pMachineWindow) 207 , m_mode(renderMode)208 202 , m_uScreenId(uScreenId) 209 203 , m_globalSettings(vboxGlobal().settings()) … … 464 458 #ifdef VBOX_GUI_USE_QGLFB 465 459 QWidget *pViewport; 466 switch ( mode())460 switch (vboxGlobal().vmRenderMode()) 467 461 { 468 462 case VBoxDefs::QGLMode: … … 481 475 m_pFrameBuffer = NULL; 482 476 483 switch ( mode())477 switch (vboxGlobal().vmRenderMode()) 484 478 { 485 479 #ifdef VBOX_GUI_USE_QIMAGE … … 590 584 #endif /* VBOX_GUI_USE_QUARTZ2D */ 591 585 default: 592 AssertReleaseMsgFailed(("Render mode must be valid: %d\n", mode()));593 LogRel(("Invalid render mode: %d\n", mode()));586 AssertReleaseMsgFailed(("Render mode must be valid: %d\n", vboxGlobal().vmRenderMode())); 587 LogRel(("Invalid render mode: %d\n", vboxGlobal().vmRenderMode())); 594 588 qApp->exit(1); 595 589 break; … … 1161 1155 case KMachineState_TeleportingPausedVM: 1162 1156 { 1163 if ( mode() != VBoxDefs::TimerMode && m_pFrameBuffer &&1157 if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer && 1164 1158 (state != KMachineState_TeleportingPausedVM || m_previousState != KMachineState_Teleporting)) 1165 1159 { … … 1198 1192 || m_previousState == KMachineState_Restoring) 1199 1193 { 1200 if ( mode() != VBoxDefs::TimerMode && m_pFrameBuffer)1194 if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer) 1201 1195 { 1202 1196 /* Reset the pixmap to free memory: */ … … 1710 1704 { 1711 1705 #if 0 // TODO: Move that to fullscreen event-hjadler: 1712 if ( mode() != VBoxDefs::SDLMode)1706 if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode) 1713 1707 { 1714 1708 /* try to automatically scroll the guest canvas if the … … 1737 1731 int vw = visibleWidth(), vh = visibleHeight(); 1738 1732 1739 if ( mode() != VBoxDefs::SDLMode)1733 if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode) 1740 1734 { 1741 1735 /* Try to automatically scroll the guest canvas if the … … 1833 1827 1834 1828 #ifdef VBOX_GUI_USE_QUARTZ2D 1835 if ( mode() == VBoxDefs::Quartz2DMode && m_pFrameBuffer)1829 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode && m_pFrameBuffer) 1836 1830 { 1837 1831 m_pFrameBuffer->paintEvent(pPaintEvent); … … 2678 2672 { 2679 2673 # ifdef VBOX_GUI_USE_QUARTZ2D 2680 if ( mode() == VBoxDefs::Quartz2DMode)2674 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode) 2681 2675 { 2682 2676 /* If the render mode is Quartz2D we could use the CGImageRef -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r29816 r30347 50 50 /* Factory function to create required view sub-child: */ 51 51 static UIMachineView* create( UIMachineWindow *pMachineWindow 52 , VBoxDefs::RenderMode renderMode53 52 #ifdef VBOX_WITH_VIDEOHWACCEL 54 53 , bool bAccelerate2DVideo … … 83 82 /* Machine view constructor/destructor: */ 84 83 UIMachineView( UIMachineWindow *pMachineWindow 85 , VBoxDefs::RenderMode renderMode86 84 #ifdef VBOX_WITH_VIDEOHWACCEL 87 85 , bool bAccelerate2DVideo … … 100 98 int visibleWidth() const; 101 99 int visibleHeight() const; 102 VBoxDefs::RenderMode mode() const { return m_mode; }103 100 ulong screenId() const { return m_uScreenId; } 104 101 UIFrameBuffer* frameBuffer() const { return m_pFrameBuffer; } … … 217 214 /* Private members: */ 218 215 UIMachineWindow *m_pMachineWindow; 219 VBoxDefs::RenderMode m_mode;220 216 ulong m_uScreenId; 221 217 const VBoxGlobalSettings &m_globalSettings; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r30291 r30347 31 31 32 32 /* Local includes */ 33 #include "VBoxGlobal.h" 33 34 #include "UISession.h" 34 35 #include "UIActionsPool.h" … … 40 41 41 42 UIMachineViewFullscreen::UIMachineViewFullscreen( UIMachineWindow *pMachineWindow 42 , VBoxDefs::RenderMode renderMode43 43 #ifdef VBOX_WITH_VIDEOHWACCEL 44 44 , bool bAccelerate2DVideo … … 46 46 , ulong uMonitor) 47 47 : UIMachineView( pMachineWindow 48 , renderMode49 48 #ifdef VBOX_WITH_VIDEOHWACCEL 50 49 , bAccelerate2DVideo … … 379 378 * We need to do that because we cannot correctly draw in a scrolled window in SDL mode. 380 379 * In all other modes, or when auto-resize is in force, this function does nothing. */ 381 if ( mode() == VBoxDefs::SDLMode)380 if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode) 382 381 { 383 382 if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r28800 r30347 29 29 protected: 30 30 31 /* Normal machineview constructor/destructor: */31 /* Fullscreen machine-view constructor/destructor: */ 32 32 UIMachineViewFullscreen( UIMachineWindow *pMachineWindow 33 , VBoxDefs::RenderMode renderMode34 33 #ifdef VBOX_WITH_VIDEOHWACCEL 35 34 , bool bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r30213 r30347 213 213 214 214 m_pMachineView = UIMachineView::create( this 215 , vboxGlobal().vmRenderMode()216 215 #ifdef VBOX_WITH_VIDEOHWACCEL 217 216 , bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r30291 r30347 36 36 37 37 UIMachineViewNormal::UIMachineViewNormal( UIMachineWindow *pMachineWindow 38 , VBoxDefs::RenderMode renderMode39 38 #ifdef VBOX_WITH_VIDEOHWACCEL 40 39 , bool bAccelerate2DVideo … … 42 41 , ulong uMonitor) 43 42 : UIMachineView( pMachineWindow 44 , renderMode45 43 #ifdef VBOX_WITH_VIDEOHWACCEL 46 44 , bAccelerate2DVideo … … 420 418 availableGeo = dwt->availableGeometry(pTopLevelWidget->pos()); 421 419 422 frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, mode() != VBoxDefs::SDLMode /* can resize? */);420 frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode /* can resize? */); 423 421 } 424 422 … … 464 462 * We need to do that because we cannot correctly draw in a scrolled window in SDL mode. 465 463 * In all other modes, or when auto-resize is in force, this function does nothing. */ 466 if ( mode() == VBoxDefs::SDLMode)464 if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode) 467 465 { 468 466 if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r30291 r30347 29 29 protected: 30 30 31 /* Normal machine 31 /* Normal machine-view constructor/destructor: */ 32 32 UIMachineViewNormal( UIMachineWindow *pMachineWindow 33 , VBoxDefs::RenderMode renderMode34 33 #ifdef VBOX_WITH_VIDEOHWACCEL 35 34 , bool bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r30213 r30347 473 473 474 474 m_pMachineView = UIMachineView::create( this 475 , vboxGlobal().vmRenderMode()476 475 #ifdef VBOX_WITH_VIDEOHWACCEL 477 476 , bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r30291 r30347 40 40 41 41 UIMachineViewSeamless::UIMachineViewSeamless( UIMachineWindow *pMachineWindow 42 , VBoxDefs::RenderMode renderMode43 42 #ifdef VBOX_WITH_VIDEOHWACCEL 44 43 , bool bAccelerate2DVideo … … 46 45 , ulong uMonitor) 47 46 : UIMachineView( pMachineWindow 48 , renderMode49 47 #ifdef VBOX_WITH_VIDEOHWACCEL 50 48 , bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
r28800 r30347 29 29 protected: 30 30 31 /* Seamless machine 31 /* Seamless machine-view constructor/destructor: */ 32 32 UIMachineViewSeamless( UIMachineWindow *pMachineWindow 33 , VBoxDefs::RenderMode renderMode34 33 #ifdef VBOX_WITH_VIDEOHWACCEL 35 34 , bool bAccelerate2DVideo -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r30213 r30347 264 264 265 265 m_pMachineView = UIMachineView::create( this 266 , vboxGlobal().vmRenderMode()267 266 #ifdef VBOX_WITH_VIDEOHWACCEL 268 267 , bAccelerate2DVideo
Note:
See TracChangeset
for help on using the changeset viewer.