Changeset 81964 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 18, 2019 8:42:02 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134761
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r81962 r81964 1912 1912 CHECK_ERROR_BREAK(recordingSettings, COMGETTER(Screens)(ComSafeArrayAsOutParam(saRecordingScreenScreens))); 1913 1913 1914 ComPtr<IGraphicsAdapter> pGraphicsAdapter; 1915 CHECK_ERROR_BREAK(sessionMachine, COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam())); 1916 1914 1917 /* Note: For now all screens have the same configuration. */ 1915 1918 … … 1929 1932 { 1930 1933 ULONG cMonitors = 64; 1931 CHECK_ERROR_BREAK( sessionMachine, COMGETTER(MonitorCount)(&cMonitors));1934 CHECK_ERROR_BREAK(pGraphicsAdapter, COMGETTER(MonitorCount)(&cMonitors)); 1932 1935 com::SafeArray<BOOL> saScreens(cMonitors); 1933 1936 if ( a->argc == 4 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r81603 r81964 723 723 SHOW_ULONG_PROP( machine, MemorySize, "memory", "Memory size", "MB"); 724 724 SHOW_BOOLEAN_PROP( machine, PageFusionEnabled, "pagefusion", "Page Fusion:"); 725 SHOW_ULONG_PROP( machine, VRAMSize, "vram", "VRAM size:", "MB"); 725 ComPtr<IGraphicsAdapter> pGraphicsAdapter; 726 machine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam()); 727 SHOW_ULONG_PROP(pGraphicsAdapter, VRAMSize, "vram", "VRAM size:", "MB"); 726 728 SHOW_ULONG_PROP( machine, CPUExecutionCap, "cpuexecutioncap", "CPU exec cap:", "%"); 727 729 SHOW_BOOLEAN_PROP( machine, HPETEnabled, "hpet", "HPET:"); … … 920 922 921 923 GraphicsControllerType_T enmGraphics; 922 rc = machine->COMGETTER(GraphicsControllerType)(&enmGraphics);924 rc = pGraphicsAdapter->COMGETTER(GraphicsControllerType)(&enmGraphics); 923 925 if (SUCCEEDED(rc)) 924 926 { … … 962 964 } 963 965 964 SHOW_ULONG_PROP( machine, MonitorCount,"monitorcount", "Monitor count:", "");965 SHOW_BOOLEAN_PROP( machine, Accelerate3DEnabled,"accelerate3d", "3D Acceleration:");966 SHOW_ULONG_PROP(pGraphicsAdapter, MonitorCount, "monitorcount", "Monitor count:", ""); 967 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate3DEnabled, "accelerate3d", "3D Acceleration:"); 966 968 #ifdef VBOX_WITH_VIDEOHWACCEL 967 SHOW_BOOLEAN_PROP( machine, Accelerate2DVideoEnabled, "accelerate2dvideo","2D Video Acceleration:");969 SHOW_BOOLEAN_PROP(pGraphicsAdapter, Accelerate2DVideoEnabled, "accelerate2dvideo", "2D Video Acceleration:"); 968 970 #endif 969 971 SHOW_BOOLEAN_PROP( machine, TeleporterEnabled, "teleporterenabled", "Teleporter Enabled:"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r81603 r81964 558 558 sessionMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam()); 559 559 560 ComPtr<IGraphicsAdapter> pGraphicsAdapter; 561 sessionMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam()); 562 560 563 RTGETOPTSTATE GetOptState; 561 564 RTGetOptInit(&GetOptState, a->argc, a->argv, g_aModifyVMOptions, … … 642 645 case MODIFYVM_VRAM: 643 646 { 644 CHECK_ERROR( sessionMachine, COMSETTER(VRAMSize)(ValueUnion.u32));647 CHECK_ERROR(pGraphicsAdapter, COMSETTER(VRAMSize)(ValueUnion.u32)); 645 648 break; 646 649 } … … 892 895 if ( !RTStrICmp(ValueUnion.psz, "none") 893 896 || !RTStrICmp(ValueUnion.psz, "disabled")) 894 CHECK_ERROR( sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null));897 CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null)); 895 898 else if ( !RTStrICmp(ValueUnion.psz, "vboxvga") 896 899 || !RTStrICmp(ValueUnion.psz, "vbox") 897 900 || !RTStrICmp(ValueUnion.psz, "vga") 898 901 || !RTStrICmp(ValueUnion.psz, "vesa")) 899 CHECK_ERROR( sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA));902 CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA)); 900 903 #ifdef VBOX_WITH_VMSVGA 901 904 else if ( !RTStrICmp(ValueUnion.psz, "vmsvga") 902 905 || !RTStrICmp(ValueUnion.psz, "vmware")) 903 CHECK_ERROR( sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VMSVGA));906 CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VMSVGA)); 904 907 else if ( !RTStrICmp(ValueUnion.psz, "vboxsvga") 905 908 || !RTStrICmp(ValueUnion.psz, "svga")) 906 CHECK_ERROR( sessionMachine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxSVGA));909 CHECK_ERROR(pGraphicsAdapter, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxSVGA)); 907 910 #endif 908 911 else … … 916 919 case MODIFYVM_MONITORCOUNT: 917 920 { 918 CHECK_ERROR( sessionMachine, COMSETTER(MonitorCount)(ValueUnion.u32));921 CHECK_ERROR(pGraphicsAdapter, COMSETTER(MonitorCount)(ValueUnion.u32)); 919 922 break; 920 923 } … … 922 925 case MODIFYVM_ACCELERATE3D: 923 926 { 924 CHECK_ERROR( sessionMachine, COMSETTER(Accelerate3DEnabled)(ValueUnion.f));927 CHECK_ERROR(pGraphicsAdapter, COMSETTER(Accelerate3DEnabled)(ValueUnion.f)); 925 928 break; 926 929 } … … 929 932 case MODIFYVM_ACCELERATE2DVIDEO: 930 933 { 931 CHECK_ERROR( sessionMachine, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f));934 CHECK_ERROR(pGraphicsAdapter, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f)); 932 935 break; 933 936 } … … 3006 3009 { 3007 3010 ULONG cMonitors = 64; 3008 CHECK_ERROR( sessionMachine, COMGETTER(MonitorCount)(&cMonitors));3011 CHECK_ERROR(pGraphicsAdapter, COMGETTER(MonitorCount)(&cMonitors)); 3009 3012 com::SafeArray<BOOL> screens(cMonitors); 3010 3013 if (parseScreens(ValueUnion.psz, &screens)) -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r81537 r81964 1457 1457 1458 1458 ComPtr<IMachine> pMachine; 1459 ComPtr<IGraphicsAdapter> pGraphicsAdapter; 1459 1460 1460 1461 rc = pVirtualBoxClient.createInprocObject(CLSID_VirtualBoxClient); … … 1950 1951 } 1951 1952 1953 rc = gpMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam()); 1954 if (rc != S_OK) 1955 { 1956 RTPrintf("Error: could not get graphics adapter object\n"); 1957 goto leave; 1958 } 1959 1952 1960 if (vramSize) 1953 1961 { 1954 rc = gpMachine->COMSETTER(VRAMSize)(vramSize);1962 rc = pGraphicsAdapter->COMSETTER(VRAMSize)(vramSize); 1955 1963 if (rc != S_OK) 1956 1964 { 1957 gpMachine->COMGETTER(VRAMSize)((ULONG*)&vramSize);1965 pGraphicsAdapter->COMGETTER(VRAMSize)((ULONG*)&vramSize); 1958 1966 RTPrintf("Error: could not set VRAM size, using current setting of %d MBytes\n", vramSize); 1959 1967 } … … 1976 1984 goto leave; 1977 1985 1978 gpMachine->COMGETTER(MonitorCount)(&gcMonitors);1986 pGraphicsAdapter->COMGETTER(MonitorCount)(&gcMonitors); 1979 1987 if (gcMonitors > 64) 1980 1988 gcMonitors = 64; -
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r81603 r81964 976 976 print(" CPUs [CPUCount]: %d" % (mach.CPUCount)) 977 977 print(" RAM [memorySize]: %dM" % (mach.memorySize)) 978 print(" VRAM [VRAMSize]: %dM" % (mach. VRAMSize))979 print(" Monitors [monitorCount]: %d" % (mach. monitorCount))978 print(" VRAM [VRAMSize]: %dM" % (mach.graphicsAdapter.VRAMSize)) 979 print(" Monitors [monitorCount]: %d" % (mach.graphicsAdapter.monitorCount)) 980 980 print(" Chipset [chipsetType]: %s (%s)" % (asEnumElem(ctx, "ChipsetType", mach.chipsetType), mach.chipsetType)) 981 981 print() … … 996 996 print(" Nested paging [guest win machine.setHWVirtExProperty(ctx[\\'const\\'].HWVirtExPropertyType_NestedPaging, value)]: " + asState(hwVirtNestedPaging)) 997 997 998 print(" Hardware 3d acceleration [accelerate3DEnabled]: " + asState(mach. accelerate3DEnabled))999 print(" Hardware 2d video acceleration [accelerate2DVideoEnabled]: " + asState(mach. accelerate2DVideoEnabled))998 print(" Hardware 3d acceleration [accelerate3DEnabled]: " + asState(mach.graphicsAdapter.accelerate3DEnabled)) 999 print(" Hardware 2d video acceleration [accelerate2DVideoEnabled]: " + asState(mach.graphicsAdapter.accelerate2DVideoEnabled)) 1000 1000 1001 1001 print(" Use universal time [RTCUseUTC]: %s" % (asState(mach.RTCUseUTC))) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r80215 r81964 30 30 #include "COMEnums.h" 31 31 #include "CAudioAdapter.h" 32 #include "CGraphicsAdapter.h" 32 33 #include "CMachine.h" 33 34 #include "CMediumAttachment.h" … … 260 261 } 261 262 263 const CGraphicsAdapter comGraphics = comMachine.GetGraphicsAdapter(); 264 262 265 /* Video memory: */ 263 266 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_VRAM) … … 265 268 /* Configure hovering anchor: */ 266 269 const QString strAnchorType = QString("video_memory"); 267 const int iVideoMemory = com Machine.GetVRAMSize();270 const int iVideoMemory = comGraphics.GetVRAMSize(); 268 271 table << UITextTableLine(QApplication::translate("UIDetails", "Video Memory", "details (display)"), 269 272 QString("<a href=#%1,%2>%3</a>") … … 276 279 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay_ScreenCount) 277 280 { 278 const int cGuestScreens = com Machine.GetMonitorCount();281 const int cGuestScreens = comGraphics.GetMonitorCount(); 279 282 if (cGuestScreens > 1) 280 283 table << UITextTableLine(QApplication::translate("UIDetails", "Screens", "details (display)"), … … 304 307 { 305 308 const QString strAnchorType = QString("graphics_controller_type"); 306 const KGraphicsControllerType enmType = com Machine.GetGraphicsControllerType();309 const KGraphicsControllerType enmType = comGraphics.GetGraphicsControllerType(); 307 310 table << UITextTableLine(QApplication::translate("UIDetails", "Graphics Controller", "details (display)"), 308 311 QString("<a href=#%1,%2>%3</a>") … … 318 321 #ifdef VBOX_WITH_VIDEOHWACCEL 319 322 /* 2D acceleration: */ 320 if (com Machine.GetAccelerate2DVideoEnabled())323 if (comGraphics.GetAccelerate2DVideoEnabled()) 321 324 acceleration << QApplication::translate("UIDetails", "2D Video", "details (display)"); 322 325 #endif 323 326 /* 3D acceleration: */ 324 if (com Machine.GetAccelerate3DEnabled())327 if (comGraphics.GetAccelerate3DEnabled()) 325 328 acceleration << QApplication::translate("UIDetails", "3D", "details (display)"); 326 329 if (!acceleration.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.cpp
r81422 r81964 27 27 /* COM includes: */ 28 28 #include "CAudioAdapter.h" 29 #include "CGraphicsAdapter.h" 29 30 #include "CNetworkAdapter.h" 30 31 #include "CUSBController.h" … … 159 160 { 160 161 /* Change machine video memory (VRAM): */ 161 comMachine. SetVRAMSize(guiAttribute.toInt());162 comMachine.GetGraphicsAdapter().SetVRAMSize(guiAttribute.toInt()); 162 163 if (!comMachine.isOk()) 163 164 { … … 170 171 { 171 172 /* Change machine graphics controller type: */ 172 comMachine. SetGraphicsControllerType(guiAttribute.value<KGraphicsControllerType>());173 comMachine.GetGraphicsAdapter().SetGraphicsControllerType(guiAttribute.value<KGraphicsControllerType>()); 173 174 if (!comMachine.isOk()) 174 175 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r80831 r81964 39 39 /* COM includes: */ 40 40 #include "CAudioAdapter.h" 41 #include "CGraphicsAdapter.h" 41 42 #include "CRecordingSettings.h" 42 43 #include "CRecordingScreenSettings.h" … … 742 743 QString strFullData; 743 744 745 CGraphicsAdapter comGraphics = machine.GetGraphicsAdapter(); 744 746 /* Video Memory: */ 745 const ULONG uVRAMSize = machine.GetVRAMSize();747 const ULONG uVRAMSize = comGraphics.GetVRAMSize(); 746 748 const QString strVRAMSize = UICommon::tr("<nobr>%1 MB</nobr>", "details report").arg(uVRAMSize); 747 749 strFullData += s_strTableRow2 … … 749 751 750 752 /* Monitor Count: */ 751 const ULONG uMonitorCount = machine.GetMonitorCount();753 const ULONG uMonitorCount = comGraphics.GetMonitorCount(); 752 754 if (uMonitorCount > 1) 753 755 { … … 758 760 759 761 /* 3D acceleration: */ 760 const bool fAcceleration3D = machine.GetAccelerate3DEnabled() && uiCommon().is3DAvailable();762 const bool fAcceleration3D = comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable(); 761 763 if (fAcceleration3D) 762 764 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r80652 r81964 68 68 /* COM includes: */ 69 69 #include "CKeyboard.h" 70 #include "CGraphicsAdapter.h" 70 71 71 72 /* Other VBox includes: */ … … 1014 1015 ::memset(m_pressedKeys, 0, sizeof(m_pressedKeys)); 1015 1016 1016 m_cMonitors = uisession()->machine().Get MonitorCount();1017 m_cMonitors = uisession()->machine().GetGraphicsAdapter().GetMonitorCount(); 1017 1018 } 1018 1019 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r81328 r81964 72 72 /* COM includes: */ 73 73 #include "CAudioAdapter.h" 74 #include "CGraphicsAdapter.h" 74 75 #include "CRecordingSettings.h" 75 76 #include "CVirtualBoxErrorInfo.h" … … 1840 1841 /* TODO_NEW_CORE: On reset the additional screens didn't get a display 1841 1842 update. Emulate this for now until it get fixed. */ 1842 ulong uMonitorCount = machine().Get MonitorCount();1843 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 1843 1844 for (ulong uScreenId = 1; uScreenId < uMonitorCount; ++uScreenId) 1844 1845 machineWindows().at(uScreenId)->update(); … … 3121 3122 { 3122 3123 /* Get console: */ 3123 const int cGuestScreens = machine().Get MonitorCount();3124 const int cGuestScreens = machine().GetGraphicsAdapter().GetMonitorCount(); 3124 3125 QList<QImage> images; 3125 3126 ULONG uMaxWidth = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r80652 r81964 55 55 #include "CConsole.h" 56 56 #include "CDisplay.h" 57 #include "CGraphicsAdapter.h" 57 58 #include "CSession.h" 58 59 #include "CFramebuffer.h" … … 243 244 244 245 /* Propagate the scale-factor related attributes to 3D service if necessary: */ 245 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())246 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 246 247 { 247 248 double dScaleFactorFor3D = dScaleFactor; … … 426 427 if ( !isFullscreenOrSeamless() 427 428 && uisession()->isGuestSupportsGraphics() 428 && (machine().GetGraphics ControllerType() != KGraphicsControllerType_VMSVGA))429 && (machine().GetGraphicsAdapter().GetGraphicsControllerType() != KGraphicsControllerType_VMSVGA)) 429 430 storeGuestSizeHint(QSize(iWidth, iHeight)); 430 431 … … 519 520 520 521 /* Propagate the scale-factor related attributes to 3D service if necessary: */ 521 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())522 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 522 523 { 523 524 double dScaleFactorFor3D = dScaleFactor; … … 715 716 716 717 /* Propagate the scale-factor related attributes to 3D service if necessary: */ 717 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())718 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 718 719 { 719 720 double dScaleFactorFor3D = dScaleFactor; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r80617 r81964 44 44 /* COM includes: */ 45 45 #include "CConsole.h" 46 #include "CGraphicsAdapter.h" 46 47 #include "CSnapshot.h" 47 48 … … 495 496 #ifdef VBOX_WITH_VIDEOHWACCEL 496 497 /* Need to force the QGL framebuffer in case 2D Video Acceleration is supported & enabled: */ 497 bool bAccelerate2DVideo = machine().Get Accelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable();498 bool bAccelerate2DVideo = machine().GetGraphicsAdapter().GetAccelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable(); 498 499 #endif /* VBOX_WITH_VIDEOHWACCEL */ 499 500 … … 573 574 strMachineName += " - " + (strUserProductName.isEmpty() ? defaultWindowTitle() : strUserProductName); 574 575 #endif /* !VBOX_WS_MAC */ 575 if (machine().Get MonitorCount() > 1)576 if (machine().GetGraphicsAdapter().GetMonitorCount() > 1) 576 577 strMachineName += QString(" : %1").arg(m_uScreenId + 1); 577 578 setWindowTitle(strMachineName); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r79365 r81964 38 38 #include "CMachine.h" 39 39 #include "CDisplay.h" 40 #include "CGraphicsAdapter.h" 40 41 41 42 42 43 UIMultiScreenLayout::UIMultiScreenLayout(UIMachineLogic *pMachineLogic) 43 44 : m_pMachineLogic(pMachineLogic) 44 , m_cGuestScreens(m_pMachineLogic->machine().Get MonitorCount())45 , m_cGuestScreens(m_pMachineLogic->machine().GetGraphicsAdapter().GetMonitorCount()) 45 46 , m_cHostScreens(0) 46 47 { … … 227 228 if (m_pMachineLogic->uisession()->isGuestSupportsGraphics()) 228 229 { 229 quint64 availBits = m_pMachineLogic->machine().Get VRAMSize() * _1M * 8;230 quint64 availBits = m_pMachineLogic->machine().GetGraphicsAdapter().GetVRAMSize() * _1M * 8; 230 231 quint64 usedBits = memoryRequirements(tmpMap); 231 232 fSuccess = availBits >= usedBits; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r81826 r81964 63 63 /* COM includes: */ 64 64 #include "CAudioAdapter.h" 65 #include "CGraphicsAdapter.h" 65 66 #include "CRecordingSettings.h" 66 67 #include "CSystemProperties.h" … … 246 247 /* Log whether 2D video acceleration is enabled: */ 247 248 LogRel(("GUI: 2D video acceleration is %s\n", 248 machine().Get Accelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable()249 machine().GetGraphicsAdapter().GetAccelerate2DVideoEnabled() && VBox2DHelpers::isAcceleration2DVideoAvailable() 249 250 ? "enabled" : "disabled")); 250 251 #endif /* VBOX_WITH_VIDEOHWACCEL */ … … 1224 1225 1225 1226 /* Prepare initial screen visibility status: */ 1226 m_monitorVisibilityVector.resize(machine().Get MonitorCount());1227 m_monitorVisibilityVector.resize(machine().GetGraphicsAdapter().GetMonitorCount()); 1227 1228 m_monitorVisibilityVector.fill(false); 1228 1229 m_monitorVisibilityVector[0] = true; 1229 1230 1230 1231 /* Prepare empty last full-screen size vector: */ 1231 m_monitorLastFullScreenSizeVector.resize(machine().Get MonitorCount());1232 m_monitorLastFullScreenSizeVector.resize(machine().GetGraphicsAdapter().GetMonitorCount()); 1232 1233 m_monitorLastFullScreenSizeVector.fill(QSize(-1, -1)); 1233 1234 … … 1269 1270 1270 1271 /* Prepare initial screen visibility status of host-desires (same as facts): */ 1271 m_monitorVisibilityVectorHostDesires.resize(machine().Get MonitorCount());1272 m_monitorVisibilityVectorHostDesires.resize(machine().GetGraphicsAdapter().GetMonitorCount()); 1272 1273 for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex) 1273 1274 m_monitorVisibilityVectorHostDesires[iScreenIndex] = m_monitorVisibilityVector[iScreenIndex]; … … 1281 1282 { 1282 1283 /* Each framebuffer will be really prepared on first UIMachineView creation: */ 1283 m_frameBufferVector.resize(machine().Get MonitorCount());1284 m_frameBufferVector.resize(machine().GetGraphicsAdapter().GetMonitorCount()); 1284 1285 1285 1286 /* Make sure action-pool knows guest-screen count: */ … … 2195 2196 /* Remember 'desired' visibility status: */ 2196 2197 /* See note in UIMachineView::sltHandleNotifyChange() regarding the graphics controller check. */ 2197 if (machine().GetGraphics ControllerType() != KGraphicsControllerType_VMSVGA)2198 if (machine().GetGraphicsAdapter().GetGraphicsControllerType() != KGraphicsControllerType_VMSVGA) 2198 2199 gEDataManager->setLastGuestScreenVisibilityStatus(uScreenId, fIsMonitorVisible, uiCommon().managedVMUuid()); 2199 2200 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r80818 r81964 39 39 #endif /* VBOX_WS_MAC */ 40 40 41 /* COM includes: */ 42 #include "CGraphicsAdapter.h" 43 41 44 42 45 UIMachineLogicFullscreen::UIMachineLogicFullscreen(QObject *pParent, UISession *pSession) … … 62 65 if (uisession()->isGuestSupportsGraphics()) 63 66 { 64 quint64 availBits = machine().Get VRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */;67 quint64 availBits = machine().GetGraphicsAdapter().GetVRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */; 65 68 quint64 usedBits = m_pScreenLayout->memoryRequirements(); 66 69 if (availBits < usedBits) … … 527 530 528 531 /* Create machine-window(s): */ 529 for (uint cScreenId = 0; cScreenId < machine().Get MonitorCount(); ++cScreenId)532 for (uint cScreenId = 0; cScreenId < machine().GetGraphicsAdapter().GetMonitorCount(); ++cScreenId) 530 533 addMachineWindow(UIMachineWindow::create(this, cScreenId)); 531 534 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
r81510 r81964 31 31 32 32 /* COM includes: */ 33 #include "CGraphicsAdapter.h" 33 34 #include "CGuest.h" 34 35 #include "CVRDEServerInfo.h" … … 251 252 void UIRuntimeInfoWidget::updateScreenInfo(int iScreenID /* = -1 */) 252 253 { 253 ULONG uGuestScreens = m_machine.Get MonitorCount();254 ULONG uGuestScreens = m_machine.GetGraphicsAdapter().GetMonitorCount(); 254 255 m_screenResolutions.resize(uGuestScreens); 255 256 if (iScreenID != -1 && iScreenID >= (int)uGuestScreens) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r80881 r81964 42 42 #include "CConsole.h" 43 43 #include "CDisplay.h" 44 #include "CGraphicsAdapter.h" 44 45 45 46 … … 319 320 320 321 /* Get monitors count: */ 321 ulong uMonitorCount = machine().Get MonitorCount();322 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 322 323 /* Create machine window(s): */ 323 324 for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
r80652 r81964 36 36 #endif 37 37 38 /* GUI includes: */ 39 #include "CGraphicsAdapter.h" 40 38 41 39 42 UIMachineLogicScale::UIMachineLogicScale(QObject *pParent, UISession *pSession) … … 138 141 139 142 /* Get monitors count: */ 140 ulong uMonitorCount = machine().Get MonitorCount();143 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 141 144 /* Create machine window(s): */ 142 145 for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r79365 r81964 33 33 #include "CConsole.h" 34 34 #include "CDisplay.h" 35 #include "CGraphicsAdapter.h" 35 36 36 37 /* Other VBox includes: */ … … 71 72 { 72 73 /* Propagate scale-factor to 3D service if necessary: */ 73 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())74 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 74 75 { 75 76 double xScaleFactor = (double)scaledSize.width() / frameBuffer()->width(); … … 130 131 { 131 132 /* Propagate scale-factor to 3D service if necessary: */ 132 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())133 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 133 134 { 134 135 double xScaleFactor = (double)scaledSize.width() / frameBuffer()->width(); … … 153 154 frameBuffer()->setUseUnscaledHiDPIOutput(fUseUnscaledHiDPIOutput); 154 155 /* Propagate unscaled-hidpi-output feature to 3D service if necessary: */ 155 if (machine().Get Accelerate3DEnabled() && uiCommon().is3DAvailable())156 if (machine().GetGraphicsAdapter().GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 156 157 display().NotifyHiDPIOutputPolicyChange(fUseUnscaledHiDPIOutput); 157 158 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r80652 r81964 37 37 #endif /* VBOX_WS_MAC */ 38 38 39 /* GUI includes: */ 40 #include "CGraphicsAdapter.h" 41 39 42 40 43 UIMachineLogicSeamless::UIMachineLogicSeamless(QObject *pParent, UISession *pSession) … … 59 62 if (uisession()->isGuestSupportsSeamless()) 60 63 { 61 quint64 availBits = machine().Get VRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */;64 quint64 availBits = machine().GetGraphicsAdapter().GetVRAMSize() /* VRAM */ * _1M /* MiB to bytes */ * 8 /* to bits */; 62 65 quint64 usedBits = m_pScreenLayout->memoryRequirements(); 63 66 if (availBits < usedBits) … … 268 271 269 272 /* Create machine-window(s): */ 270 for (uint cScreenId = 0; cScreenId < machine().Get MonitorCount(); ++cScreenId)273 for (uint cScreenId = 0; cScreenId < machine().GetGraphicsAdapter().GetMonitorCount(); ++cScreenId) 271 274 addMachineWindow(UIMachineWindow::create(this, cScreenId)); 272 275 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r81457 r81964 52 52 53 53 /* COM includes: */ 54 #include "CGraphicsAdapter.h" 54 55 #include "CUSBController.h" 55 56 … … 469 470 { 470 471 if (pDisplayPage && pDisplayPage->isAcceleration2DVideoSelected()) 471 m_machine. SetAccelerate2DVideoEnabled(false);472 m_machine.GetGraphicsAdapter().SetAccelerate2DVideoEnabled(false); 472 473 } 473 474 #endif /* VBOX_WITH_VIDEOHWACCEL */ … … 478 479 && pDisplayPage->isAcceleration3DSelected() 479 480 && pDisplayPage->graphicsControllerTypeCurrent() != pDisplayPage->graphicsControllerTypeRecommended()) 480 m_machine. SetGraphicsControllerType(pDisplayPage->graphicsControllerTypeRecommended());481 m_machine.GetGraphicsAdapter().SetGraphicsControllerType(pDisplayPage->graphicsControllerTypeRecommended()); 481 482 #endif /* VBOX_WITH_3D_ACCELERATION */ 482 483 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r81457 r81964 27 27 28 28 /* COM includes: */ 29 #include "CGraphicsAdapter.h" 29 30 #include "CRecordingSettings.h" 30 31 #include "CRecordingScreenSettings.h" … … 371 372 372 373 /* Gather old 'Screen' data: */ 373 oldDisplayData.m_iCurrentVRAM = m_machine.GetVRAMSize(); 374 oldDisplayData.m_cGuestScreenCount = m_machine.GetMonitorCount(); 374 const CGraphicsAdapter &comGraphics = m_machine.GetGraphicsAdapter(); 375 oldDisplayData.m_iCurrentVRAM = comGraphics.GetVRAMSize(); 376 oldDisplayData.m_cGuestScreenCount = comGraphics.GetMonitorCount(); 375 377 oldDisplayData.m_scaleFactors = gEDataManager->scaleFactors(m_machine.GetId()); 376 oldDisplayData.m_graphicsControllerType = m_machine.GetGraphicsControllerType();378 oldDisplayData.m_graphicsControllerType = comGraphics.GetGraphicsControllerType(); 377 379 #ifdef VBOX_WITH_3D_ACCELERATION 378 oldDisplayData.m_f3dAccelerationEnabled = m_machine.GetAccelerate3DEnabled();380 oldDisplayData.m_f3dAccelerationEnabled = comGraphics.GetAccelerate3DEnabled(); 379 381 #endif 380 382 #ifdef VBOX_WITH_VIDEOHWACCEL 381 oldDisplayData.m_f2dVideoAccelerationEnabled = m_machine.GetAccelerate2DVideoEnabled();383 oldDisplayData.m_f2dVideoAccelerationEnabled = comGraphics.GetAccelerate2DVideoEnabled(); 382 384 #endif 383 385 /* Check whether remote display server is valid: */ … … 1373 1375 if (fSuccess) 1374 1376 { 1377 CGraphicsAdapter comGraphics = m_machine.GetGraphicsAdapter(); 1375 1378 /* Get old display data from the cache: */ 1376 1379 const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base(); … … 1381 1384 if (fSuccess && isMachineOffline() && newDisplayData.m_iCurrentVRAM != oldDisplayData.m_iCurrentVRAM) 1382 1385 { 1383 m_machine.SetVRAMSize(newDisplayData.m_iCurrentVRAM);1384 fSuccess = m_machine.isOk();1386 comGraphics.SetVRAMSize(newDisplayData.m_iCurrentVRAM); 1387 fSuccess = comGraphics.isOk(); 1385 1388 } 1386 1389 /* Save guest screen count: */ 1387 1390 if (fSuccess && isMachineOffline() && newDisplayData.m_cGuestScreenCount != oldDisplayData.m_cGuestScreenCount) 1388 1391 { 1389 m_machine.SetMonitorCount(newDisplayData.m_cGuestScreenCount);1390 fSuccess = m_machine.isOk();1392 comGraphics.SetMonitorCount(newDisplayData.m_cGuestScreenCount); 1393 fSuccess = comGraphics.isOk(); 1391 1394 } 1392 1395 /* Save the Graphics Controller Type: */ 1393 1396 if (fSuccess && isMachineOffline() && newDisplayData.m_graphicsControllerType != oldDisplayData.m_graphicsControllerType) 1394 1397 { 1395 m_machine.SetGraphicsControllerType(newDisplayData.m_graphicsControllerType);1396 fSuccess = m_machine.isOk();1398 comGraphics.SetGraphicsControllerType(newDisplayData.m_graphicsControllerType); 1399 fSuccess = comGraphics.isOk(); 1397 1400 } 1398 1401 #ifdef VBOX_WITH_3D_ACCELERATION … … 1400 1403 if (fSuccess && isMachineOffline() && newDisplayData.m_f3dAccelerationEnabled != oldDisplayData.m_f3dAccelerationEnabled) 1401 1404 { 1402 m_machine.SetAccelerate3DEnabled(newDisplayData.m_f3dAccelerationEnabled);1403 fSuccess = m_machine.isOk();1405 comGraphics.SetAccelerate3DEnabled(newDisplayData.m_f3dAccelerationEnabled); 1406 fSuccess = comGraphics.isOk(); 1404 1407 } 1405 1408 #endif … … 1408 1411 if (fSuccess && isMachineOffline() && newDisplayData.m_f2dVideoAccelerationEnabled != oldDisplayData.m_f2dVideoAccelerationEnabled) 1409 1412 { 1410 m_machine.SetAccelerate2DVideoEnabled(newDisplayData.m_f2dVideoAccelerationEnabled);1411 fSuccess = m_machine.isOk();1413 comGraphics.SetAccelerate2DVideoEnabled(newDisplayData.m_f2dVideoAccelerationEnabled); 1414 fSuccess = comGraphics.isOk(); 1412 1415 } 1413 1416 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r79365 r81964 44 44 /* COM includes: */ 45 45 #include "CAudioAdapter.h" 46 #include "CGraphicsAdapter.h" 46 47 #include "CRecordingSettings.h" 47 48 #include "CRecordingScreenSettings.h" … … 1311 1312 case DetailsElementType_Display: 1312 1313 { 1314 const CGraphicsAdapter &comGraphics = comMachine.GetGraphicsAdapter(); 1315 const CGraphicsAdapter &comGraphicsOld = comMachineOld.GetGraphicsAdapter(); 1313 1316 /* Video Memory: */ 1314 1317 ++iRowCount; 1315 const QString strVram = QApplication::translate("UIDetails", "%1 MB", "details").arg(com Machine.GetVRAMSize());1316 const QString strVramOld = QApplication::translate("UIDetails", "%1 MB", "details").arg(com MachineOld.GetVRAMSize());1318 const QString strVram = QApplication::translate("UIDetails", "%1 MB", "details").arg(comGraphics.GetVRAMSize()); 1319 const QString strVramOld = QApplication::translate("UIDetails", "%1 MB", "details").arg(comGraphicsOld.GetVRAMSize()); 1317 1320 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIDetails", "Video Memory", "details (display)"), 1318 1321 empReport(strVram, strVramOld)); 1319 1322 1320 1323 /* Screens? */ 1321 const int cScreens = com Machine.GetMonitorCount();1322 const int cScreensOld = com MachineOld.GetMonitorCount();1324 const int cScreens = comGraphics.GetMonitorCount(); 1325 const int cScreensOld = comGraphicsOld.GetMonitorCount(); 1323 1326 if (cScreens > 1) 1324 1327 { … … 1341 1344 /* Graphics Controller: */ 1342 1345 ++iRowCount; 1343 const QString strGc = gpConverter->toString(com Machine.GetGraphicsControllerType());1344 const QString strGcOld = gpConverter->toString(com MachineOld.GetGraphicsControllerType());1346 const QString strGc = gpConverter->toString(comGraphics.GetGraphicsControllerType()); 1347 const QString strGcOld = gpConverter->toString(comGraphicsOld.GetGraphicsControllerType()); 1345 1348 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIDetails", "Graphics Controller", "details (display)"), 1346 1349 empReport(strGc, strGcOld)); 1347 1350 1348 1351 /* Acceleration? */ 1349 const QString strAcceleration = displayAccelerationReport(com Machine);1350 const QString strAccelerationOld = displayAccelerationReport(com MachineOld);1352 const QString strAcceleration = displayAccelerationReport(comGraphics); 1353 const QString strAccelerationOld = displayAccelerationReport(comGraphicsOld); 1351 1354 if (!strAcceleration.isNull()) 1352 1355 { … … 1711 1714 1712 1715 /* static */ 1713 QString UISnapshotDetailsWidget::displayAccelerationReport(C Machine comMachine)1716 QString UISnapshotDetailsWidget::displayAccelerationReport(CGraphicsAdapter comGraphics) 1714 1717 { 1715 1718 /* Prepare report: */ … … 1717 1720 #ifdef VBOX_WITH_VIDEOHWACCEL 1718 1721 /* 2D Video Acceleration? */ 1719 if (com Machine.GetAccelerate2DVideoEnabled())1722 if (comGraphics.GetAccelerate2DVideoEnabled()) 1720 1723 aReport << QApplication::translate("UIDetails", "2D Video", "details (display)"); 1721 1724 #endif 1722 1725 /* 3D Acceleration? */ 1723 if (com Machine.GetAccelerate3DEnabled() && uiCommon().is3DAvailable())1726 if (comGraphics.GetAccelerate3DEnabled() && uiCommon().is3DAvailable()) 1724 1727 aReport << QApplication::translate("UIDetails", "3D", "details (display)"); 1725 1728 /* Compose and return report: */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.h
r76581 r81964 31 31 /* COM includes: */ 32 32 #include "COMEnums.h" 33 #include "CGraphicsAdapter.h" 33 34 #include "CMachine.h" 34 35 #include "CSnapshot.h" … … 162 163 static double scaleFactorReport(CMachine comMachine); 163 164 /** Acquires @a comMachine display acceleration report. */ 164 static QString displayAccelerationReport(C Machine comMachine);165 static QString displayAccelerationReport(CGraphicsAdapter comGraphics); 165 166 /** Acquires @a comMachine VRDE server report. */ 166 167 static QStringList vrdeServerReport(CMachine comMachine); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r79365 r81964 28 28 /* COM includes: */ 29 29 #include "CAudioAdapter.h" 30 #include "CGraphicsAdapter.h" 30 31 #include "CUSBController.h" 31 32 #include "CUSBDeviceFilters.h" … … 129 130 m_machine.SetMemorySize(field("ram").toUInt()); 130 131 /* Correct the VRAM size since API does not take fullscreen memory requirements into account: */ 131 m_machine.SetVRAMSize(qMax(m_machine.GetVRAMSize(), (ULONG)(UICommon::requiredVideoMemory(strTypeId) / _1M))); 132 CGraphicsAdapter comGraphics = m_machine.GetGraphicsAdapter(); 133 comGraphics.SetVRAMSize(qMax(comGraphics.GetVRAMSize(), (ULONG)(UICommon::requiredVideoMemory(strTypeId) / _1M))); 132 134 #endif 133 135 … … 149 151 m_machine.SetMemorySize(field("ram").toInt()); 150 152 153 CGraphicsAdapter comGraphics = m_machine.GetGraphicsAdapter(); 151 154 /* Graphics Controller type: */ 152 m_machine.SetGraphicsControllerType(comGuestType.GetRecommendedGraphicsController());155 comGraphics.SetGraphicsControllerType(comGuestType.GetRecommendedGraphicsController()); 153 156 154 157 /* VRAM size - select maximum between recommended and minimum for fullscreen: */ 155 m_machine.SetVRAMSize(qMax(comGuestType.GetRecommendedVRAM(), (ULONG)(UICommon::requiredVideoMemory(strGuestTypeId) / _1M)));158 comGraphics.SetVRAMSize(qMax(comGuestType.GetRecommendedVRAM(), (ULONG)(UICommon::requiredVideoMemory(strGuestTypeId) / _1M))); 156 159 157 160 /* Selecting recommended chipset type: */ … … 275 278 /* Set graphic bits: */ 276 279 if (comGuestType.GetRecommended2DVideoAcceleration()) 277 m_machine.SetAccelerate2DVideoEnabled(comGuestType.GetRecommended2DVideoAcceleration());280 comGraphics.SetAccelerate2DVideoEnabled(comGuestType.GetRecommended2DVideoAcceleration()); 278 281 279 282 if (comGuestType.GetRecommended3DAcceleration()) 280 m_machine.SetAccelerate3DEnabled(comGuestType.GetRecommended3DAcceleration());283 comGraphics.SetAccelerate3DEnabled(comGuestType.GetRecommended3DAcceleration()); 281 284 } 282 285
Note:
See TracChangeset
for help on using the changeset viewer.