Changeset 7610 in vbox for trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
- Timestamp:
- Mar 27, 2008 10:48:00 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29110
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r6794 r7610 124 124 QRegion mReg; 125 125 }; 126 127 /////////////////////////////////////////////////////////////////////////////128 129 #if defined (VBOX_GUI_USE_REFRESH_TIMER)130 131 /**132 * Copies the current VM video buffer contents to the pixmap referenced133 * by the argument. The return value indicates whether the134 * 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 be139 * 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 bool rc = pm.convertFromImage (QImage (addr,151 display.GetWidth(), display.GetHeight(),152 display.GetBitsPerPixel(),153 0, 0, QImage::LittleEndian));154 AssertMsg (rc, ("convertFromImage() must always return true"));155 156 display.UnlockFramebuffer();157 158 return rc;159 }160 161 #endif162 126 163 127 /////////////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.