Changeset 51459 in vbox for trunk/src/VBox
- Timestamp:
- May 29, 2014 12:04:50 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94029
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
r49940 r51459 1343 1343 mPixelFormat(fb->pixelFormat()), mVRAM(fb->address()), mBitsPerPixel(fb->bitsPerPixel()), 1344 1344 mBytesPerLine(fb->bytesPerLine()), mWidth(fb->width()), mHeight(fb->height()), 1345 mUsesGuestVram( fb->usesGuestVRAM()) {}1345 mUsesGuestVram(true) {} 1346 1346 1347 1347 VBoxFBSizeInfo(ulong aPixelFormat, uchar *aVRAM, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r51458 r51459 169 169 if (!pbUsesGuestVRAM) 170 170 return E_POINTER; 171 *pbUsesGuestVRAM = usesGuestVRAM();171 *pbUsesGuestVRAM = true; 172 172 return S_OK; 173 173 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r51458 r51459 186 186 } 187 187 188 virtual bool usesGuestVRAM()189 {190 return false;191 }192 193 188 void lock() const { RTCritSectEnter(&m_critSect); } 194 189 void unlock() const { RTCritSectLeave(&m_critSect); } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp
r51458 r51459 126 126 m_img = QImage((uchar *)pEvent->VRAM(), m_width, m_height, bitsPerLine / 8, format); 127 127 m_uPixelFormat = FramebufferPixelFormat_FOURCC_RGB; 128 m_bUsesGuestVRAM = true;129 128 } 130 129 } … … 186 185 * GUI didn't received event about that or didn't processed it yet. */ 187 186 KMachineState machineState = m_pMachineView->uisession()->session().GetConsole().GetState(); 188 if ( m_bUsesGuestVRAM 189 /* running */ 190 && machineState != KMachineState_Running 187 if (/* running */ 188 machineState != KMachineState_Running 191 189 && machineState != KMachineState_Teleporting 192 190 && machineState != KMachineState_LiveSnapshotting … … 414 412 m_img = QImage(pAddress, ulWidth, ulHeight, ulBytesPerLine, QImage::Format_RGB32); 415 413 m_uPixelFormat = FramebufferPixelFormat_FOURCC_RGB; 416 m_bUsesGuestVRAM = true; 417 } 418 } 419 414 } 415 } 416 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.h
r51404 r51459 37 37 /* API: Frame-buffer stuff: */ 38 38 ulong pixelFormat() { return m_uPixelFormat; } 39 bool usesGuestVRAM() { return m_bUsesGuestVRAM; }40 39 uchar *address() { return m_img.bits(); } 41 40 ulong bitsPerPixel() { return m_img.depth(); } … … 65 64 QImage m_img; 66 65 ulong m_uPixelFormat; 67 bool m_bUsesGuestVRAM;68 66 }; 69 67 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp
r49267 r51459 50 50 UIFrameBufferQuartz2D::UIFrameBufferQuartz2D(UIMachineView *pMachineView) 51 51 : UIFrameBuffer(pMachineView) 52 , m_fUsesGuestVRAM(false)53 52 , m_pDataAddress(NULL) 54 53 , m_pBitmapData(NULL) … … 201 200 && aEvent->bitsPerPixel() == 32) 202 201 { 203 m_fUsesGuestVRAM = true;204 // printf ("VRAM\n");205 202 /* Create the image copy of the framebuffer */ 206 203 CGDataProviderRef dp = CGDataProviderCreateWithData(NULL, aEvent->VRAM(), aEvent->bytesPerLine() * m_height, NULL); … … 213 210 else 214 211 { 215 m_fUsesGuestVRAM = false;216 212 remind = true; 217 // printf ("No VRAM\n");218 213 /* Create the memory we need for our image copy 219 214 * Read somewhere that an alignment of 16 is … … 247 242 * the link between framebuffer and video memory 248 243 * is broken, we should go fallback now... */ 249 if (m_fUsesGuestVRAM && 250 !m_pMachineView->uisession()->isRunning() && 244 if (!m_pMachineView->uisession()->isRunning() && 251 245 !m_pMachineView->uisession()->isPaused() && 252 246 /* Online snapshotting: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.h
r49128 r51459 44 44 ulong bytesPerLine() { return CGImageGetBytesPerRow(m_image); } 45 45 ulong pixelFormat() { return m_uPixelFormat; }; 46 bool usesGuestVRAM() { return m_pBitmapData == NULL; }47 46 48 47 const CGImageRef imageRef() const { return m_image; } … … 55 54 void clean(bool fPreserveRegions); 56 55 57 bool m_fUsesGuestVRAM;58 56 uchar *m_pDataAddress; 59 57 void *m_pBitmapData;
Note:
See TracChangeset
for help on using the changeset viewer.