Changeset 22028 in vbox for trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
- Timestamp:
- Aug 6, 2009 11:50:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r21977 r22028 634 634 uint32_t fourcc() const {return mDataFormat;} 635 635 uint32_t bitsPerPixel() const { return mBitsPerPixel; } 636 uint32_t bitsPerPixelDd() const { return mBitsPerPixelDd; } 636 uint32_t bitsPerPixelTex() const { return mBitsPerPixelTex; } 637 // uint32_t bitsPerPixelDd() const { return mBitsPerPixelDd; } 637 638 void pixel2Normalized(uint32_t pix, float *r, float *g, float *b) const; 638 639 uint32_t widthCompression() const {return mWidthCompression;} … … 652 653 653 654 uint32_t mBitsPerPixel; 654 uint32_t mBitsPerPixelDd; 655 uint32_t mBitsPerPixelTex; 656 // uint32_t mBitsPerPixelDd; 655 657 uint32_t mWidthCompression; 656 658 uint32_t mHeightCompression; … … 679 681 const QRect & rect() {return mRect;} 680 682 uchar * address(){ return mAddress; } 681 uint32_t rectSizeTex(const QRect * pRect) {return pRect->width() * pRect->height() * mBytesPerPixel ;}683 uint32_t rectSizeTex(const QRect * pRect) {return pRect->width() * pRect->height() * mBytesPerPixelTex;} 682 684 uchar * pointAddress(int x, int y) 683 685 { … … 686 688 return pointAddressTex(x, y); 687 689 } 688 uint32_t pointOffsetTex(int x, int y) { return y*mBytesPerLine + x*mBytesPerPixel ; }690 uint32_t pointOffsetTex(int x, int y) { return y*mBytesPerLine + x*mBytesPerPixelTex; } 689 691 uchar * pointAddressTex(int x, int y) { return mAddress + pointOffsetTex(x, y); } 690 692 int toXTex(int x) {return x/mColorFormat.widthCompression();} 691 693 int toYTex(int y) {return y/mColorFormat.heightCompression();} 692 ulong memSize(){ return mBytesPerLine * mRect.height()/mColorFormat.heightCompression(); } 694 ulong memSize(){ return mBytesPerLine * mRect.height(); } 695 uint32_t bytesPerLine() {return mBytesPerLine; } 693 696 694 697 protected: … … 704 707 GLuint mTexture; 705 708 uint32_t mBytesPerPixel; 709 uint32_t mBytesPerPixelTex; 706 710 uint32_t mBytesPerLine; 707 711 VBoxVHWAColorFormat mColorFormat; … … 716 720 VBoxVHWATextureNP2(const QRect * pRect, const VBoxVHWAColorFormat *pFormat) : 717 721 VBoxVHWATexture(pRect, pFormat){ 718 mTexRect = *pRect;722 mTexRect = QRect(0, 0, pRect->width()/pFormat->widthCompression(), pRect->height()/pFormat->heightCompression()); 719 723 } 720 724 }; … … 782 786 VBoxVHWAColorFormat & aColorFormat, 783 787 VBoxVHWAColorKey * pSrcBltCKey, VBoxVHWAColorKey * pDstBltCKey, 784 VBoxVHWAColorKey * pSrcOverlayCKey, VBoxVHWAColorKey * pDstOverlayCKey); 788 VBoxVHWAColorKey * pSrcOverlayCKey, VBoxVHWAColorKey * pDstOverlayCKey, 789 bool bVGA); 785 790 786 791 virtual ~VBoxVHWASurfaceBase(); … … 824 829 uint32_t fourcc() {return mColorFormat.fourcc(); } 825 830 826 ulong bytesPerPixel() { return mBytesPerPixel; }831 // ulong bytesPerPixel() { return mpTex[0]->bytesPerPixel(); } 827 832 ulong bitsPerPixel() { return mColorFormat.bitsPerPixel(); } 828 ulong bitsPerPixelDd() { return mColorFormat.bitsPerPixelDd(); }829 ulong bytesPerLine() { return m BytesPerLine; }833 // ulong bitsPerPixelDd() { return mColorFormat.bitsPerPixelDd(); } 834 ulong bytesPerLine() { return mpTex[0]->bytesPerLine(); } 830 835 831 836 const VBoxVHWAColorKey * dstBltCKey() const { return mpDstBltCKey; } … … 934 939 935 940 const QRect& rect() {return mRect;} 936 const QRect& texRect() {return mTexRect;}941 // const QRect& texRect() {return mTexRect;} 937 942 938 943 // /* surface currently being displayed in a flip chain */ … … 990 995 // void doTex2FB(const QRect * aRect); 991 996 void doTex2FB(const QRect * pDstRect, const QRect * pSrcRect); 992 void doMultiTex2FB(const QRect * pDstRect, const QRect * pDstTexSize, const QRect * pSrcRect, int cSrcTex);997 void doMultiTex2FB(const QRect * pDstRect, VBoxVHWATexture * pDstTex, const QRect * pSrcRect, int cSrcTex); 993 998 void doMultiTex2FB(const QRect * pDstRect, const QRect * pSrcRect, int cSrcTex); 994 999 // void doMultiTex2FB(GLenum tex, const QRect * pDstRect, const QRect * pSrcRect); … … 997 1002 998 1003 QRect mRect; /* == Inv FB size */ 999 QRect mTexRect; /* texture size */1004 // QRect mTexRect; /* texture size */ 1000 1005 1001 1006 QRect mSrcRect; … … 1032 1037 1033 1038 1034 GLenum mFormat;1035 GLint mInternalFormat;1036 GLenum mType;1039 // GLenum mFormat; 1040 // GLint mInternalFormat; 1041 // GLenum mType; 1037 1042 // ulong mDisplayWidth; 1038 1043 // ulong mDisplayHeight; 1039 ulong mBytesPerPixel;1040 ulong mBytesPerLine;1044 // ulong mBytesPerPixel; 1045 // ulong mBytesPerLine; 1041 1046 1042 1047 int mLockCount;
Note:
See TracChangeset
for help on using the changeset viewer.