Changeset 21490 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Jul 10, 2009 5:29:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r21414 r21490 408 408 uint32_t upper() const {return mUpper; } 409 409 uint32_t lower() const {return mLower; } 410 411 bool operator==(const VBoxVHWAColorKey & other) const { return mUpper == other.mUpper && mLower == other.mLower; } 410 412 private: 411 413 uint32_t mUpper; 412 414 uint32_t mLower; 413 415 }; 416 417 //class VBoxVHWAColorKeyRef 418 //{ 419 //public: 420 // VBoxVHWAColorKeyRef() : mValid(false){} 421 // 422 // bool isValid() {return mValid; } 423 // 424 // VBoxVHWAColorKey * ckey() { isVreturn mpCKey; } 425 // const VBoxVHWAColorKey * constckey() const { return mpCKey; } 426 // 427 // void invalidate() { mValid = false; } 428 // void set(VBoxVHWAColorKey * pKey) { mValid = false; } 429 // 430 //private: 431 // VBoxVHWAColorKey * mpCKey; 432 // bool mValid; 433 //}; 414 434 415 435 class VBoxVHWAColorComponent … … 508 528 509 529 int blt(const QRect * aDstRect, VBoxVHWASurfaceBase * aSrtSurface, const QRect * aSrcRect, const VBoxVHWAColorKey * pDstCKeyOverride, const VBoxVHWAColorKey * pSrcCKeyOverride); 530 int overlay(VBoxVHWASurfaceBase * aOverlaySurface); 510 531 511 532 virtual int lock(const QRect * pRect, uint32_t flags); … … 541 562 ulong bytesPerLine() { return mBytesPerLine; } 542 563 543 const VBoxVHWAColorKey * dstBltCKey() { return mDstBltCKeyValid ? &mDstBltCKey : NULL; } 544 const VBoxVHWAColorKey * srcBltCKey() { return mSrcBltCKeyValid ? &mSrcBltCKey : NULL; } 545 const VBoxVHWAColorKey * dstOverlayCKey() { return mDstOverlayCKeyValid ? &mDstOverlayCKey : NULL; } 546 const VBoxVHWAColorKey * srcOverlayCKey() { return mSrcOverlayCKeyValid ? &mSrcOverlayCKey : NULL; } 564 const VBoxVHWAColorKey * dstBltCKey() const { return mpDstBltCKey; } 565 const VBoxVHWAColorKey * srcBltCKey() const { return mpSrcBltCKey; } 566 const VBoxVHWAColorKey * dstOverlayCKey() const { return mpDstOverlayCKey; } 567 const VBoxVHWAColorKey * defaultSrcOverlayCKey() const { return mpDefaultSrcOverlayCKey; } 568 const VBoxVHWAColorKey * defaultDstOverlayCKey() const { return mpDefaultDstOverlayCKey; } 569 const VBoxVHWAColorKey * srcOverlayCKey() const { return mpSrcOverlayCKey; } 570 void resetDefaultSrcOverlayCKey() { mpSrcOverlayCKey = mpDefaultSrcOverlayCKey; } 571 void resetDefaultDstOverlayCKey() { mpDstOverlayCKey = mpDefaultDstOverlayCKey; } 572 573 void setDstBltCKey(const VBoxVHWAColorKey * ckey) 574 { 575 if(ckey) 576 { 577 mDstBltCKey = *ckey; 578 mpDstBltCKey = &mDstBltCKey; 579 } 580 else 581 { 582 mpDstBltCKey = NULL; 583 } 584 } 585 586 void setSrcBltCKey(const VBoxVHWAColorKey * ckey) 587 { 588 if(ckey) 589 { 590 mSrcBltCKey = *ckey; 591 mpSrcBltCKey = &mSrcBltCKey; 592 } 593 else 594 { 595 mpSrcBltCKey = NULL; 596 } 597 } 598 599 void setDefaultDstOverlayCKey(const VBoxVHWAColorKey * ckey) 600 { 601 if(ckey) 602 { 603 mDefaultDstOverlayCKey = *ckey; 604 mpDefaultDstOverlayCKey = &mDefaultDstOverlayCKey; 605 } 606 else 607 { 608 mpDefaultDstOverlayCKey = NULL; 609 } 610 } 611 612 void setDefaultSrcOverlayCKey(const VBoxVHWAColorKey * ckey) 613 { 614 if(ckey) 615 { 616 mDefaultSrcOverlayCKey = *ckey; 617 mpDefaultSrcOverlayCKey = &mDefaultSrcOverlayCKey; 618 } 619 else 620 { 621 mpDefaultSrcOverlayCKey = NULL; 622 } 623 } 624 625 void setOverriddenDstOverlayCKey(const VBoxVHWAColorKey * ckey) 626 { 627 if(ckey) 628 { 629 mOverriddenDstOverlayCKey = *ckey; 630 mpDstOverlayCKey = &mOverriddenDstOverlayCKey; 631 } 632 else 633 { 634 mpDstOverlayCKey = NULL; 635 } 636 } 637 638 void setOverriddenSrcOverlayCKey(const VBoxVHWAColorKey * ckey) 639 { 640 if(ckey) 641 { 642 mOverriddenSrcOverlayCKey = *ckey; 643 mpSrcOverlayCKey = &mOverriddenSrcOverlayCKey; 644 } 645 else 646 { 647 mpSrcOverlayCKey = NULL; 648 } 649 } 650 651 547 652 const VBoxVHWAColorFormat & colorFormat() {return mColorFormat; } 548 653 … … 562 667 563 668 bool isYInverted() {return mIsYInverted; } 669 670 bool isHidden() {return mIsHidden; } 671 void setHidden(bool hidden) { mIsHidden = hidden; } 564 672 565 673 int invert(); … … 586 694 void synch(const QRect * aRect); 587 695 696 int performBlt(const QRect * pDstRect, VBoxVHWASurfaceBase * pSrcSurface, const QRect * pSrcRect, const VBoxVHWAColorKey * pDstCKey, const VBoxVHWAColorKey * pSrcCKey, bool blt); 697 588 698 // void doTex2FB(const QRect * aRect); 589 699 void doTex2FB(const QRect * pDstRect, const QRect * pSrcRect); … … 608 718 609 719 VBoxVHWAColorFormat mColorFormat; 720 721 VBoxVHWAColorKey *mpSrcBltCKey; 722 VBoxVHWAColorKey *mpDstBltCKey; 723 VBoxVHWAColorKey *mpSrcOverlayCKey; 724 VBoxVHWAColorKey *mpDstOverlayCKey; 725 726 VBoxVHWAColorKey *mpDefaultDstOverlayCKey; 727 VBoxVHWAColorKey *mpDefaultSrcOverlayCKey; 728 610 729 VBoxVHWAColorKey mSrcBltCKey; 611 730 VBoxVHWAColorKey mDstBltCKey; 612 VBoxVHWAColorKey m SrcOverlayCKey;613 VBoxVHWAColorKey m DstOverlayCKey;614 bool mSrcBltCKeyValid;615 bool mDstBltCKeyValid;616 bool mSrcOverlayCKeyValid; 617 bool mDstOverlayCKeyValid; 731 VBoxVHWAColorKey mOverriddenSrcOverlayCKey; 732 VBoxVHWAColorKey mOverriddenDstOverlayCKey; 733 VBoxVHWAColorKey mDefaultDstOverlayCKey; 734 VBoxVHWAColorKey mDefaultSrcOverlayCKey; 735 736 618 737 GLenum mFormat; 619 738 GLint mInternalFormat; … … 641 760 bool mIsYInverted; 642 761 762 bool mIsHidden; 763 643 764 // bool mIsOverlay; 644 765 … … 670 791 { 671 792 return mSurfVGA; 793 } 794 795 VBoxVHWASurfaceBase * getPrimary() 796 { 797 return mSurfPrimary; 672 798 } 673 799 … … 715 841 it != mOverlays.end(); ++ it) 716 842 { 717 (*it)->performDisplay();843 mSurfPrimary->overlay(*it); 718 844 } 719 845 } … … 781 907 mInverted = false; 782 908 } 909 } 910 } 911 912 void makeCurrent(class VBoxVHWASurfaceBase *aContext, bool mInverted) 913 { 914 if(mInverted) 915 { 916 makeYInvertedCurrent(aContext); 917 } 918 else 919 { 920 makeCurrent(aContext); 783 921 } 784 922 } … … 909 1047 int vhwaSurfaceBlt(struct _VBOXVHWACMD_SURF_BLT *pCmd); 910 1048 int vhwaSurfaceFlip(struct _VBOXVHWACMD_SURF_FLIP *pCmd); 1049 int vhwaSurfaceOverlayUpdate(struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE *pCmf); 1050 int vhwaSurfaceOverlaySetPosition(struct _VBOXVHWACMD_SURF_OVERLAY_SETPOSITION *pCmd); 1051 int vhwaSurfaceColorkeySet(struct _VBOXVHWACMD_SURF_COLORKEY_SET *pCmd); 911 1052 int vhwaQueryInfo1(struct _VBOXVHWACMD_QUERYINFO1 *pCmd); 912 1053 int vhwaQueryInfo2(struct _VBOXVHWACMD_QUERYINFO2 *pCmd);
Note:
See TracChangeset
for help on using the changeset viewer.