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.

142 lines
4.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: patblt.hxx
  3. *
  4. * This contains the prototypes for pattern blt to DIB special case.
  5. *
  6. * Created: 01-Mar-1991 22:15:02
  7. * Author: Patrick Haluptzok patrickh
  8. *
  9. * Copyright (c) 1990-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. typedef struct _ROW
  12. {
  13. LONG left;
  14. LONG right;
  15. } ROW, *PROW;
  16. VOID vDIBSolidBlt(
  17. SURFACE *pdioDst,
  18. RECTL *prclDst,
  19. CLIPOBJ *pco,
  20. ULONG iColor,
  21. BOOL bCopy);
  22. typedef VOID (*PFN_SOLIDBLT)(PRECTL,ULONG,PBYTE,LONG,ULONG,ULONG);
  23. typedef VOID (*PFN_SOLIDBLTROW)(PROW,ULONG,LONG,PBYTE,ULONG,LONG,ULONG);
  24. VOID vSolidFillRect1(PRECTL,ULONG,PBYTE,LONG,ULONG,ULONG);
  25. VOID vSolidFillRect24(PRECTL,ULONG,PBYTE,LONG,ULONG,ULONG);
  26. VOID vSolidXorRect1(PRECTL,ULONG,PBYTE,LONG,ULONG,ULONG);
  27. VOID vSolidXorRect24(PRECTL,ULONG,PBYTE,LONG,ULONG,ULONG);
  28. VOID vSolidFillRow1(PROW,ULONG,LONG,PBYTE,ULONG,LONG,ULONG);
  29. VOID vSolidFillRow24(PROW,ULONG,LONG,PBYTE,ULONG,LONG,ULONG);
  30. VOID vSolidXorRow1(PROW,ULONG,LONG,PBYTE,ULONG,LONG,ULONG);
  31. VOID vSolidXorRow24(PROW,ULONG,LONG,PBYTE,ULONG,LONG,ULONG);
  32. VOID vDIBPatBlt(
  33. SURFACE *pdioDst,
  34. CLIPOBJ *pco,
  35. RECTL *prclDst,
  36. BRUSHOBJ *pbo,
  37. POINTL *pptlBrush,
  38. ULONG iMode);
  39. #define DPA_PATCOPY 0
  40. #define DPA_PATNOT 1
  41. #define DPA_PATXOR 2
  42. typedef struct _PATBLTFRAME
  43. {
  44. PVOID pvTrg;
  45. PVOID pvPat;
  46. LONG lDeltaTrg;
  47. LONG lDeltaPat;
  48. PVOID pvObj; // RECTL * or TRAPEZOID *
  49. LONG xPat;
  50. LONG yPat;
  51. ULONG cxPat;
  52. ULONG cyPat;
  53. ULONG cMul;
  54. } PATBLTFRAME, *PPATBLTFRAME;
  55. typedef VOID (*PFN_PATBLT)(PATBLTFRAME *);
  56. typedef VOID (*PFN_PATBLT2)(PATBLTFRAME *, INT);
  57. typedef VOID (*PFN_PATBLTROW)(PATBLTFRAME *, LONG, INT);
  58. VOID vPatCpyRect8(PATBLTFRAME *); // Handles 8, 16, 24 and 32 bpp cases
  59. VOID vPatNotRect8(PATBLTFRAME *); // Handles 8, 16, 24 and 32 bpp cases
  60. VOID vPatXorRect8(PATBLTFRAME *); // Handles 8, 16, 24 and 32 bpp cases
  61. VOID vPatCpyRow8(PATBLTFRAME *, LONG, INT); // Handles 8, 16, 24 and 32 bpp cases
  62. VOID vPatNotRow8(PATBLTFRAME *, LONG, INT); // Handles 8, 16, 24 and 32 bpp cases
  63. VOID vPatXorRow8(PATBLTFRAME *, LONG, INT); // Handles 8, 16, 24 and 32 bpp cases
  64. typedef struct _FETCHFRAME
  65. {
  66. PVOID pvTrg;
  67. PVOID pvPat;
  68. ULONG xPat;
  69. ULONG cxPat;
  70. ULONG culFill;
  71. ULONG culWidth;
  72. ULONG culFillTmp;
  73. } FETCHFRAME, *PFETCHFRAME;
  74. extern "C" VOID vFetchShiftAndCopy(FETCHFRAME *pff); // P, Aligned
  75. extern "C" VOID vFetchAndCopy(FETCHFRAME *pff); // P, Non-Aligned
  76. extern "C" VOID vFetchShiftNotAndCopy(FETCHFRAME *pff); // Pn, Aligned
  77. extern "C" VOID vFetchNotAndCopy(FETCHFRAME *pff); // Pn, Non-Aligned
  78. extern "C" VOID vFetchShiftAndMerge(FETCHFRAME *pff); // DPx, Aligned
  79. extern "C" VOID vFetchAndMerge(FETCHFRAME *pff); // DPx, Non-Aligned
  80. #if defined(_AMD64_) || defined(_X86_)
  81. #define FETCHMISALIGNED(pff) *((ULONG *) ((PBYTE) (pff)->pvPat + (pff)->xPat))
  82. #elif defined(_IA64_)
  83. #define FETCHMISALIGNED(pff) *((ULONG UNALIGNED *) ((PBYTE) (pff)->pvPat + (pff)->xPat))
  84. #else
  85. //#error "No target Architecture"
  86. #endif
  87. VOID vDIBnPatBltSrccopy6x6(SURFACE*, CLIPOBJ *, RECTL *, BRUSHOBJ *,
  88. POINTL *, PFN_PATBLT2 );
  89. VOID vPatCpyRect1_6x6 (PATBLTFRAME *, INT);
  90. VOID vDIBPatBltSrccopy8x8(SURFACE*, CLIPOBJ *, RECTL *, BRUSHOBJ *, POINTL *,
  91. PFN_PATBLT2);
  92. VOID vPatCpyRect1_8x8(PATBLTFRAME *, INT);
  93. VOID vPatCpyRect4_8x8(PATBLTFRAME *, INT);
  94. VOID vPatCpyRect8_8x8(PATBLTFRAME *, INT);
  95. VOID vPatCpyRow4_8x8(PATBLTFRAME *, LONG,INT);
  96. VOID vPatCpyRow8_8x8(PATBLTFRAME *, LONG,INT);
  97. PVOID pvGetEngRbrush(BRUSHOBJ *pbo);
  98. enum { // various copy loop types
  99. LEFT_MIDDLE_RIGHT = 0,
  100. LEFT_MIDDLE,
  101. MIDDLE_RIGHT,
  102. MIDDLE,
  103. LEFT_MIDDLE_RIGHT_SHORT,
  104. LEFT_MIDDLE_SHORT,
  105. MIDDLE_RIGHT_SHORT,
  106. MIDDLE_SHORT,
  107. LEFT_RIGHT,
  108. LEFT,
  109. };
  110. VOID vPatternCopyLoop( PRECTL prcl, ULONG *pulTrgBase, PATBLTFRAME *ppbf,
  111. int ulFillType, ULONG ulRightPatMask, ULONG ulLeftPatMask,
  112. ULONG ulRightDestMask, ULONG ulLeftDestMask, LONG lMiddleDwords,
  113. LONG lDelta, LONG lDeltaX8, PULONG pulBasePat, PULONG pulPatMax );