Changeset 6649 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Jan 31, 2008 11:11:03 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27715
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r6645 r6649 464 464 465 465 #include <Carbon/Carbon.h> 466 466 467 class VBoxQuartz2DFrameBuffer : public VBoxFrameBuffer 467 468 { … … 476 477 STDMETHOD (SetVisibleRegion) (BYTE *aRectangles, ULONG aCount); 477 478 478 uchar *address 479 ulong bitsPerPixel 480 ulong bytesPerLine 481 ulong pixelFormat 482 bool usesGuestVRAM 483 484 const CGImageRef imageRef 479 uchar *address() { return mDataAddress; } 480 ulong bitsPerPixel() { return CGImageGetBitsPerPixel (mImage); } 481 ulong bytesPerLine() { return CGImageGetBytesPerRow (mImage); } 482 ulong pixelFormat() { return mPixelFormat; }; 483 bool usesGuestVRAM() { return mBitmapData == NULL; } 484 485 const CGImageRef imageRef() const { return mImage; } 485 486 486 487 void paintEvent (QPaintEvent *pe); … … 488 489 489 490 private: 491 490 492 inline CGRect QRectToCGRect (const QRect &aRect) const 491 493 { 492 return CGRectMake (aRect.x (), aRect.y (), aRect.width (), aRect.height ()); 493 } 494 return CGRectMake (aRect.x(), aRect.y(), aRect.width(), aRect.height()); 495 } 496 494 497 inline QRect mapYOrigin (const QRect &aRect, int aHeight) const 495 498 { 496 /* The cgcontext has a fliped y-coord relative to the 499 /* The cgcontext has a fliped y-coord relative to the 497 500 * qt coord system. So we need some mapping here */ 498 return QRect (aRect.x (), aHeight - (aRect.y () + aRect.height ()), aRect.width (), aRect.height ()); 499 } 500 void clean (); 501 502 uchar *mDataAddress; 501 return QRect (aRect.x(), aHeight - (aRect.y() + aRect.height()), 502 aRect.width(), aRect.height()); 503 } 504 505 void clean(); 506 507 uchar *mDataAddress; 503 508 void *mBitmapData; 504 509 ulong mPixelFormat;
Note:
See TracChangeset
for help on using the changeset viewer.