Changeset 51537 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 4, 2014 5:28:52 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r51509 r51537 526 526 m_iHeight = iHeight; 527 527 528 /* And go fallback: */ 529 goFallback(); 528 /* And recreate fallback buffer: */ 529 m_image = QImage(m_iWidth, m_iHeight, QImage::Format_RGB32); 530 m_image.fill(0); 530 531 } 531 532 /* If source-bitmap valid: */ … … 602 603 /* And return immediately: */ 603 604 return; 604 }605 606 /* If the machine is NOT in 'running', 'paused' or 'saving' state,607 * the link between the framebuffer and the video memory is broken.608 * We should go fallback in that case.609 * We should acquire actual machine-state to exclude610 * situations when the state was changed already but611 * GUI didn't received event about that or didn't processed it yet. */612 KMachineState machineState = m_pMachineView->uisession()->session().GetConsole().GetState();613 if (/* running */614 machineState != KMachineState_Running615 && machineState != KMachineState_Teleporting616 && machineState != KMachineState_LiveSnapshotting617 && machineState != KMachineState_DeletingSnapshotOnline618 /* paused */619 && machineState != KMachineState_Paused620 && machineState != KMachineState_TeleportingPausedVM621 /* saving */622 && machineState != KMachineState_Saving623 /* guru */624 && machineState != KMachineState_Stuck625 )626 {627 LogRel(("UIFrameBuffer::paintEvent: "628 "Using FALLBACK buffer due to machine-state become invalid: "629 "%d.\n", (int)machineState));630 631 /* Go fallback: */632 goFallback();633 605 } 634 606 … … 874 846 } 875 847 876 void UIFrameBuffer::goFallback()877 {878 /* We are going for FALLBACK buffer when:879 * 1. Display did not provide the source-bitmap;880 * 2. or the machine is in the state which breaks link between881 * the framebuffer and the actual video-memory: */882 m_image = QImage(m_iWidth, m_iHeight, QImage::Format_RGB32);883 m_image.fill(0);884 }885 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r51493 r51537 240 240 HiDPIOptimizationType hiDPIOptimizationType, 241 241 double dBackingScaleFactor); 242 243 /** Recreates own clean QImage buffer. */244 void goFallback();245 242 246 243 /** Holds the QImage buffer. */
Note:
See TracChangeset
for help on using the changeset viewer.