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.

164 lines
3.6 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * $Workfile: PATH.C $
  4. *
  5. * Author: Noel VanHook
  6. * Date: Jan 10, 1996
  7. *
  8. * Purpose: Handle calls to DrvStokeAndFillPath.
  9. *
  10. * Copyright (c) 1996 Cirrus Logic, Inc.
  11. *
  12. * $Log: X:/log/laguna/nt35/displays/cl546x/path.c $
  13. *
  14. * Rev 1.7 21 Mar 1997 12:21:42 noelv
  15. * Combined "do_flag" and "sw_test_flag" together into "pointer_switch"
  16. *
  17. * Rev 1.6 26 Nov 1996 09:57:52 noelv
  18. * Added DBG prints.
  19. *
  20. * Rev 1.5 06 Sep 1996 15:16:36 noelv
  21. * Updated NULL driver for 4.0
  22. *
  23. * Rev 1.4 20 Aug 1996 11:04:08 noelv
  24. * Bugfix release from Frido 8-19-96
  25. *
  26. * Rev 1.3 17 Aug 1996 14:03:28 frido
  27. * Added PVCS header.
  28. *
  29. \**************************************************************************/
  30. #include "precomp.h"
  31. #define PATH_DBG_LEVEL 1
  32. //
  33. // Since we don't accelerate these, we only hook them for analysys purposes.
  34. // Otherwise, skip the entire file.
  35. //
  36. #if NULL_STROKEFILL || PROFILE_DRIVER
  37. //
  38. // Table to convert ROP2 codes to ROP3 codes.
  39. //
  40. extern BYTE Rop2ToRop3[]; // See paint.c
  41. //
  42. // Driver profiling stuff.
  43. // Gets compiled out in a free bulid.
  44. //
  45. #if PROFILE_DRIVER
  46. void DumpStrokeAndFillInfo(INT acc, SURFOBJ* pso, MIX mix, BRUSHOBJ* pbo);
  47. #else
  48. #define DumpStrokeAndFillInfo(acc, pso, mix, pbo)
  49. #endif
  50. /**************************************************************************\
  51. * DrvStrokeAndFillPath *
  52. * *
  53. * We don't currently accelerate this, but we hook it for analysis. *
  54. * *
  55. \**************************************************************************/
  56. BOOL DrvStrokeAndFillPath
  57. (
  58. SURFOBJ *pso,
  59. PATHOBJ *ppo,
  60. CLIPOBJ *pco,
  61. XFORMOBJ *pxo,
  62. BRUSHOBJ *pboStroke,
  63. LINEATTRS *plineattrs,
  64. BRUSHOBJ *pboFill,
  65. POINTL *pptlBrushOrg,
  66. MIX mix,
  67. FLONG flOptions
  68. )
  69. {
  70. #if NULL_STROKEFILL
  71. {
  72. if (pointer_switch) return TRUE;
  73. }
  74. #endif
  75. DISPDBG((PATH_DBG_LEVEL, "DrvStrokeAndFillPath.\n"));
  76. //
  77. // Dump info on what is being punted to a file.
  78. //
  79. DumpStrokeAndFillInfo(0, pso, mix, pboStroke);
  80. //
  81. // Punt it back to GDI.
  82. //
  83. return FALSE;
  84. }
  85. // ==================================================================
  86. #if PROFILE_DRIVER
  87. void DumpStrokeAndFillInfo(
  88. INT acc,
  89. SURFOBJ* pso,
  90. MIX mix,
  91. BRUSHOBJ* pbo)
  92. {
  93. PPDEV ppdev;
  94. ppdev = (PPDEV) (pso ? pso->dhpdev : 0);
  95. //////////////////////////////////////////////////////////////
  96. // Profiling info to keep track of what GDI is asking us to do.
  97. //
  98. if (!ppdev)
  99. {
  100. RIP(("DrvStrokeAndFillPath() with no clipOBJ and no PDEV!\n"));
  101. }
  102. else
  103. {
  104. fprintf(ppdev->pfile,"DrvStrokeAndFillPath: ");
  105. fprintf(ppdev->pfile,"(PUNT) ");
  106. //
  107. // Check the DEST
  108. //
  109. fprintf(ppdev->pfile,"DEST=%s ", (ppdev ? "FB" : "HOST?") );
  110. //
  111. // Check the MIX
  112. //
  113. fprintf(ppdev->pfile,"Mix=0x%08X ", mix);
  114. //
  115. // Type of pattern.
  116. //
  117. if (pbo == NULL)
  118. fprintf(ppdev->pfile,"BRUSH=NONE ");
  119. else if (pbo->iSolidColor == 0xFFFFFFFF )
  120. {
  121. fprintf(ppdev->pfile,"BRUSH=PATTERN ");
  122. }
  123. else
  124. {
  125. fprintf(ppdev->pfile,"BRUSH=SOLID ");
  126. fprintf(ppdev->pfile,"COLOR = 0x%08X ",(pbo->iSolidColor));
  127. }
  128. fprintf(ppdev->pfile,"\n");
  129. fflush(ppdev->pfile);
  130. }
  131. }
  132. #endif // PROFILE_DRIVER
  133. #endif