Changeset 47082 in vbox
- Timestamp:
- Jul 10, 2013 2:53:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp
r47081 r47082 306 306 if (pRgnRcts && pRgnRcts->used > 0) 307 307 { 308 /* Create a subimage of the current view. 309 * Currently this subimage is the whole screen. */ 308 /* Create a subimage of the current view in the size 309 * of the bounding box of the current paint event: */ 310 CGRect cgPaintRect = ::darwinToCGRect(aEvent->rect()); 310 311 CGImageRef subImage; 311 312 if (!m_pMachineView->pauseShot().isNull()) 312 313 { 313 314 CGImageRef pauseImg = ::darwinToCGImageRef(&m_pMachineView->pauseShot()); 314 subImage = CGImageCreateWithImageInRect(pauseImg, CGRectMake(m_pMachineView->contentsX(), m_pMachineView->contentsY(), m_pMachineView->visibleWidth(), m_pMachineView->visibleHeight()));315 subImage = CGImageCreateWithImageInRect(pauseImg, cgPaintRect); 315 316 CGImageRelease(pauseImg); 316 317 } … … 322 323 * using CGImageCreateWithImageInRect without making a copy. We saw 323 324 * something like this already with the scale mode. */ 324 CGImageRef tmpImage = CGImageCreateWithImageInRect(m_image, CGRectMake(m_pMachineView->contentsX(), m_pMachineView->contentsY(), m_pMachineView->visibleWidth(), m_pMachineView->visibleHeight()));325 CGImageRef tmpImage = CGImageCreateWithImageInRect(m_image, cgPaintRect); 325 326 subImage = CGImageCreateCopy(tmpImage); 326 327 CGImageRelease(tmpImage); … … 334 335 CGContextClipToRect(ctx, viewRect); 335 336 /* At this point draw the real vm image: */ 336 CGContextDrawImage(ctx, ::darwinFlipCGRect( viewRect, viewRect.size.height), subImage);337 CGContextDrawImage(ctx, ::darwinFlipCGRect(cgPaintRect, viewRect.size.height), subImage); 337 338 338 339 /* Release the subimage: */
Note:
See TracChangeset
for help on using the changeset viewer.