VirtualBox

Ignore:
Timestamp:
Jun 4, 2014 5:28:52 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Frame-buffer: Remove *fallback* protection from paintEvent, expecting it will be provided from the Main side.

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  
    526526        m_iHeight = iHeight;
    527527
    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);
    530531    }
    531532    /* If source-bitmap valid: */
     
    602603        /* And return immediately: */
    603604        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 exclude
    610      * situations when the state was changed already but
    611      * 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_Running
    615         && machineState != KMachineState_Teleporting
    616         && machineState != KMachineState_LiveSnapshotting
    617         && machineState != KMachineState_DeletingSnapshotOnline
    618         /* paused */
    619         && machineState != KMachineState_Paused
    620         && machineState != KMachineState_TeleportingPausedVM
    621         /* saving */
    622         && machineState != KMachineState_Saving
    623         /* guru */
    624         && machineState != KMachineState_Stuck
    625         )
    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();
    633605    }
    634606
     
    874846}
    875847
    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 between
    881      *    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  
    240240                              HiDPIOptimizationType hiDPIOptimizationType,
    241241                              double dBackingScaleFactor);
    242 
    243     /** Recreates own clean QImage buffer. */
    244     void goFallback();
    245242
    246243    /** Holds the QImage buffer. */
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