Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
5.5 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: trivblt.hxx
  3. *
  4. * This contains the prototypes for the Src-Copy BitBlt code
  5. *
  6. * Created: 06-Feb-1991 11:36:01
  7. * Author: Patrick Haluptzok patrickh
  8. *
  9. * Copyright (c) 1991-1999 Microsoft Corporation
  10. *
  11. \**************************************************************************/
  12. #define MESSAGE_BLT 0 // Put this around DbgPrint
  13. #define DEBUG_BLT 1 // This is for non-printing debug stuff
  14. // We pass a pointer to this data struct for every rectangle we blt to.
  15. struct BLTINFO
  16. {
  17. XLATE *pxlo; // Xlate object for color translation
  18. PBYTE pjSrc; // Src scanline begining
  19. PBYTE pjDst; // Destination scanline begining
  20. LONG xDir; // This tells which direction we go
  21. LONG cx; // This is the number of pels wide
  22. LONG cy; // This is the number of rows in rectangle
  23. LONG yDir; // This tells which direction we go
  24. LONG lDeltaSrc; // Pointer increment to the next source scan line
  25. LONG lDeltaDst; // Pointer increment to the next destination scan line
  26. LONG xSrcStart; // Left edge column of the source
  27. LONG xSrcEnd; // Right edge column of the source
  28. LONG xDstStart; // Starting column on the destination map. This is
  29. // the left edge for an RLE.
  30. LONG yDstStart; // Starting scanline on the destination map.
  31. LONG fSrcAlignedRd;// Do source aligned reads flags.
  32. /* Information only used in RLE blts */
  33. SURFACE *pdioSrc; // Pointer to the source surface object
  34. POINTL ptlSrc; // The starting point in the source map.
  35. RECTL rclDst; // Visible rectangle in the target map.
  36. PBYTE pjSrcEnd; // Ending position in the source map.
  37. PBYTE pjDstEnd; // Ending position in the target map.
  38. ULONG ulConsumed;// Total number of source bytes consumed.
  39. ULONG ulEndConsumed; // Ending number of source bytes consumed
  40. LONG ulOutCol; // Starting output column of the bitmap.
  41. ULONG ulEndRow; // Ending scanline on the destination map.
  42. LONG ulEndCol; // Ending column on the destination map.
  43. ULONG iFormatSrc;
  44. ULONG iFormatDst;
  45. ULONG TransparentColor; // transparent color of the source
  46. BLTINFO() { fSrcAlignedRd = FALSE; }
  47. };
  48. typedef BLTINFO *PBLTINFO;
  49. #define BB_RECT_LIMIT 20
  50. // These are the prototypes for the special case SrcCopy
  51. VOID vSrcCopyS1D1LtoR (PBLTINFO);
  52. VOID vSrcCopyS1D1RtoL (PBLTINFO);
  53. VOID vSrcCopyS4D1 (PBLTINFO);
  54. VOID vSrcCopyS8D1 (PBLTINFO);
  55. VOID vSrcCopyS16D1 (PBLTINFO);
  56. VOID vSrcCopyS24D1 (PBLTINFO);
  57. VOID vSrcCopyS32D1 (PBLTINFO);
  58. VOID vSrcCopyS1D4 (PBLTINFO);
  59. VOID vSrcCopyS4D4 (PBLTINFO);
  60. VOID vSrcCopyS4D4Identity (PBLTINFO);
  61. VOID vSrcCopyS8D4 (PBLTINFO);
  62. VOID vSrcCopyS16D4 (PBLTINFO);
  63. VOID vSrcCopyS24D4 (PBLTINFO);
  64. VOID vSrcCopyS32D4 (PBLTINFO);
  65. VOID vSrcCopyS1D8 (PBLTINFO);
  66. VOID vSrcCopyS4D8 (PBLTINFO);
  67. VOID vSrcCopyS8D8 (PBLTINFO);
  68. VOID vSrcCopyS8D8IdentityLtoR (PBLTINFO);
  69. VOID vSrcCopyS8D8IdentityRtoL (PBLTINFO);
  70. VOID vSrcCopyS16D8 (PBLTINFO);
  71. VOID vSrcCopyS24D8 (PBLTINFO);
  72. VOID vSrcCopyS32D8 (PBLTINFO);
  73. VOID vSrcCopyS1D16 (PBLTINFO);
  74. VOID vSrcCopyS4D16 (PBLTINFO);
  75. VOID vSrcCopyS8D16 (PBLTINFO);
  76. VOID vSrcCopyS16D16 (PBLTINFO);
  77. VOID vSrcCopyS16D16Identity (PBLTINFO);
  78. VOID vSrcCopyS24D16 (PBLTINFO);
  79. VOID vSrcCopyS32D16 (PBLTINFO);
  80. VOID vSrcCopyS1D24 (PBLTINFO);
  81. VOID vSrcCopyS4D24 (PBLTINFO);
  82. VOID vSrcCopyS8D24 (PBLTINFO);
  83. VOID vSrcCopyS16D24 (PBLTINFO);
  84. VOID vSrcCopyS24D24 (PBLTINFO);
  85. VOID vSrcCopyS24D24Identity (PBLTINFO);
  86. VOID vSrcCopyS32D24 (PBLTINFO);
  87. VOID vSrcCopyS1D32 (PBLTINFO);
  88. VOID vSrcCopyS4D32 (PBLTINFO);
  89. VOID vSrcCopyS8D32 (PBLTINFO);
  90. VOID vSrcCopyS16D32 (PBLTINFO);
  91. VOID vSrcCopyS24D32 (PBLTINFO);
  92. VOID vSrcCopyS32D32 (PBLTINFO);
  93. VOID vSrcCopyS32D32Identity (PBLTINFO);
  94. /* Run Length Encoded Bitmap blt functions */
  95. BOOL bSrcCopySRLE8D1 (PBLTINFO);
  96. BOOL bSrcCopySRLE8D4 (PBLTINFO);
  97. BOOL bSrcCopySRLE8D8 (PBLTINFO);
  98. BOOL bSrcCopySRLE8D16 (PBLTINFO);
  99. BOOL bSrcCopySRLE8D24 (PBLTINFO);
  100. BOOL bSrcCopySRLE8D32 (PBLTINFO);
  101. BOOL bSrcCopySRLE4D1 (PBLTINFO);
  102. BOOL bSrcCopySRLE4D4 (PBLTINFO);
  103. BOOL bSrcCopySRLE4D8 (PBLTINFO);
  104. BOOL bSrcCopySRLE4D16 (PBLTINFO);
  105. BOOL bSrcCopySRLE4D24 (PBLTINFO);
  106. BOOL bSrcCopySRLE4D32 (PBLTINFO);
  107. /* blt Function selectors */
  108. typedef VOID (*PFN_SRCCPY)(PBLTINFO);
  109. typedef BOOL (*PFN_RLECPY)(PBLTINFO);
  110. PFN_RLECPY
  111. pfnGetRLESrcCopy( /* Chooses the blt function, RLE source */
  112. ULONG iFormatSrc,
  113. ULONG iFormatDst
  114. );
  115. //
  116. // Structures and functions for StrDir
  117. //
  118. typedef struct _STR_BLT {
  119. PBYTE pjSrcScan;
  120. LONG lDeltaSrc;
  121. LONG XSrcStart;
  122. PBYTE pjDstScan;
  123. LONG lDeltaDst;
  124. LONG XDstStart;
  125. LONG XDstEnd;
  126. LONG YDstCount;
  127. ULONG ulXDstToSrcIntCeil;
  128. ULONG ulXDstToSrcFracCeil;
  129. ULONG ulYDstToSrcIntCeil;
  130. ULONG ulYDstToSrcFracCeil;
  131. ULONG ulXFracAccumulator;
  132. ULONG ulYFracAccumulator;
  133. } STR_BLT,*PSTR_BLT;