VirtualBox

Ignore:
Timestamp:
Mar 27, 2008 10:48:00 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt: Dropped refresh timer rendering mode.

Location:
trunk/src/VBox/Frontends/VirtualBox4/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r7590 r7610  
    105105    int visibleWidth() const { return horizontalScrollBar()->pageStep(); }
    106106    int visibleHeight() const { return verticalScrollBar()->pageStep(); }
    107     void scrollBy (int dx, int dy) 
    108     { 
     107    void scrollBy (int dx, int dy)
     108    {
    109109        horizontalScrollBar()->setValue (horizontalScrollBar()->value() + dx);
    110110        verticalScrollBar()->setValue (verticalScrollBar()->value() + dy);
     
    112112    QPoint viewportToContents ( const QPoint & vp ) const
    113113    {
    114         return QPoint (vp.x() + contentsX(), 
     114        return QPoint (vp.x() + contentsX(),
    115115                       vp.y() + contentsY());
    116116    }
     
    185185    void resizeEvent (QResizeEvent *);
    186186    void paintEvent (QPaintEvent *);
    187 #ifdef VBOX_GUI_USE_REFRESH_TIMER
    188     void timerEvent( QTimerEvent * );
    189 #endif
    190187
    191188    void captureKbd (bool aCapture, bool aEmitSignal = true);
     
    280277#endif
    281278
    282 #if defined (VBOX_GUI_USE_REFRESH_TIMER)
    283     QPixmap pm;
    284     int tid;        /**< Timer id */
    285 #endif
    286 
    287279    VBoxFrameBuffer *mFrameBuf;
    288280    CConsoleCallback mCallback;
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h

    r7435 r7610  
    5656  #if defined (VBOX_GUI_USE_EXT_FRAMEBUFFER)
    5757    #undef VBOX_GUI_USE_EXT_FRAMEBUFFER
    58   #endif
    59   #if !defined (VBOX_GUI_USE_REFRESH_TIMER)
    60     #define VBOX_GUI_USE_REFRESH_TIMER
    6158  #endif
    6259#endif
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFrameBuffer.h

    r7407 r7610  
    124124    QRegion mReg;
    125125};
    126 
    127 /////////////////////////////////////////////////////////////////////////////
    128 
    129 #if defined (VBOX_GUI_USE_REFRESH_TIMER)
    130 
    131 /**
    132  *  Copies the current VM video buffer contents to the pixmap referenced
    133  *  by the argument. The return value indicates whether the
    134  *  buffer has been updated since the last call to this method or not.
    135  *
    136  *  The copy operation is atomic (guarded by a mutex).
    137  *
    138  *  This method is intentionally inlined for faster execution and should be
    139  *  called only by VBoxConsoleView members.
    140  *
    141  *  @return true if the pixmap is updated, and false otherwise.
    142  */
    143 inline bool display_to_pixmap( const CConsole &c, QPixmap &pm )
    144 {
    145     CDisplay display = c.GetDisplay();
    146 
    147     uint8_t *addr = (uint8_t *) display.LockFramebuffer();
    148     AssertMsg (addr, ("The buffer address must not be null"));
    149 
    150     QImage::Format format = QImage::Format_Invalid;
    151     switch (display.GetBitsPerPixel())
    152     {
    153         /* 32-, 8- and 1-bpp are the only depths suported by QImage */
    154         case 32:
    155             format = QImage::Format_RGB32;
    156             break;
    157         case 8:
    158             format = QImage::Format_Indexed8;
    159             break;
    160         case 1:
    161             format = QImage::Format_Mono;
    162             break;
    163     }
    164 
    165     bool rc = false;
    166     if(format != QImage::Format_Invalid)
    167     {
    168         pm = QPixmap::fromImage (QImage (addr,
    169                                          display.GetWidth(), display.GetHeight(),
    170                                          format));
    171         rc = !pm.isNull();
    172         AssertMsg (rc, ("convertFromImage() must always return true"));
    173     }
    174 
    175     display.UnlockFramebuffer();
    176 
    177     return rc;
    178 }
    179 
    180 #endif
    181126
    182127/////////////////////////////////////////////////////////////////////////////
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