GR32.inc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. (* ***** BEGIN LICENSE BLOCK *****
  2. * Version: MPL 1.1 or LGPL 2.1 with linking exception
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * http://www.mozilla.org/MPL/
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * Alternatively, the contents of this file may be used under the terms of the
  15. * Free Pascal modified version of the GNU Lesser General Public License
  16. * Version 2.1 (the "FPC modified LGPL License"), in which case the provisions
  17. * of this license are applicable instead of those above.
  18. * Please see the file LICENSE.txt for additional information concerning this
  19. * license.
  20. *
  21. * The Original Code is Graphics32
  22. *
  23. * The Initial Developer of the Original Code is
  24. * Alex A. Denisov
  25. *
  26. * Portions created by the Initial Developer are Copyright (C) 2000-2009
  27. * the Initial Developer. All Rights Reserved.
  28. *
  29. * ***** END LICENSE BLOCK ***** *)
  30. {$include GR32_Compiler.inc}
  31. (* Symbol PUREPASCAL:
  32. ------------------
  33. Forces GR32 into pure pascal mode. Should generally only be used for
  34. testing and debugging purposes.
  35. The library makes use of x86 assembler optimizations. While this
  36. results in a performance boost it also makes the library platform
  37. dependent.
  38. By enabling the PUREPASCAL switch, only pascal code is used, avoiding
  39. any assmbler code. The code is slower, but probably more platform
  40. independent.
  41. (Defined by default for some targets in GR32_Compilers.INC.)
  42. *)
  43. {-$DEFINE PUREPASCAL}
  44. (* Symbol CHANGED_IN_PIXELS :
  45. --------------------------
  46. Defines if the OnChange / OnAreaChange event should be fired with
  47. safe pixel setters (PixelS, PixelTS, PixelFS etc.)
  48. NOTE: While enabling this feature is generally better for the repaint and
  49. layer optimization, in "lazy code" it is also much slower. *)
  50. {-$DEFINE CHANGED_IN_PIXELS}
  51. (* Symbol USEINLINING :
  52. --------------------
  53. Defines whether to use function inlining.
  54. NOTE: Enabling this symbol increases executable size but will probably
  55. result in better performance in most cases. *)
  56. {$IFDEF INLININGSUPPORTED}
  57. {$DEFINE USEINLINING}
  58. {$ENDIF}
  59. {$IF DEFINED(INLININGSUPPORTED) AND DEFINED(SUPPORT_ENHANCED_RECORDS) }
  60. {$DEFINE INLINING_ENHANCED_RECORDS}
  61. {$IFEND}
  62. (* Symbol USE_GUIDS_IN_MMF :
  63. -------------------------
  64. Defines whether to use GUIDs for temporary MMFs filename instead of
  65. using the GetTempFilename in WinAPI. *)
  66. {-$DEFINE USE_GUIDS_IN_MMF}
  67. (* Symbol USEMOVE :
  68. ----------------
  69. Defines whether to use Move instead of MoveLongword. *)
  70. {-$DEFINE USEMOVE}
  71. (* Symbol XPTHEMES :
  72. -----------------
  73. Enable support for windows xp themes. Eventually undefine if GR32 should
  74. be used within a DLL *)
  75. {$DEFINE XPTHEMES}
  76. (* Symbol USEMULTITHREADING :
  77. --------------------------
  78. Use multithreading by default if possible. *)
  79. {-$DEFINE USEMULTITHREADING}
  80. (* FastCode specific symbols:
  81. Adding these symbols to your project's define list will force use of the
  82. particular routine over the standard GR32 routine.
  83. GR32_FASTCODEMOVE - Uses the patched Move routine rather than MoveLongword.
  84. For more information on the FastCode project take a look at this URL:
  85. http://fastcode.sourceforge.net/
  86. For FastMove make sure to download the CPU id based function, ie. runtime
  87. RTL patching.
  88. *)
  89. {-$DEFINE GR32_FASTCODEMOVE}
  90. {$IFDEF GR32_FASTCODEMOVE}
  91. {$DEFINE USEMOVE}
  92. {$ENDIF}
  93. (*
  94. Symbol OMIT_SSE2:
  95. ----------------
  96. If defined SSE2 optimizations are not used (omitted)
  97. For faster pixel/color processing, SSE2 can be used which results in a huge
  98. performance boost over PUREPASCAL code or native assembler code.
  99. *)
  100. {-$DEFINE OMIT_SSE2}
  101. (*
  102. Symbol: CHANGENOTIFICATIONS
  103. ---------------------------
  104. If defined the polygon rasterizer will trigger change notifications.
  105. Undefining this will avoid bounding box computations, which may
  106. improve performance slightly.
  107. *)
  108. {$DEFINE CHANGENOTIFICATIONS}
  109. (*
  110. Symbol: USESTACKALLOC
  111. ---------------------
  112. If defined stack allocation routines will be used in some functions.
  113. Allocating memory on the stack is usually more efficient than using the
  114. memory manager. If a routine uses StackAllock/StackFree then it should
  115. always be wrapped inside a {$W+}...{$W-} block in order to generate
  116. a stack frame.
  117. NOTE: Undefine this symbol if you get stack overflow errors.
  118. *)
  119. {-$DEFINE USESTACKALLOC}
  120. (*
  121. Symbol: RGBA_FORMAT
  122. -------------------
  123. Assume RGBA pixel format instead of BGRA (used by e.g. OpenGL.)
  124. *)
  125. {-$DEFINE RGBA_FORMAT}
  126. (*
  127. Symbol: NOHINTING
  128. -----------------
  129. Disables font hinting by default when using TextToPath() method.
  130. It is usually preferrable to disable hinting when using a high quality
  131. polygon renderer like VPR. However, hinting can sometimes improve
  132. visual quality when rendering small text (text is adjusted to pixel
  133. boundaries which makes it more crisp.)
  134. *)
  135. {$DEFINE NOHINTING}
  136. (*
  137. Symbol: NOHORIZONTALHINTING
  138. ---------------------------
  139. Disables horizontal font hinting when using TextToPath() method.
  140. The following should not be used in conjunction with NOHINTING.
  141. It will attempt to address the problem of extreme font hinting in the
  142. GDI by disabling horizontal, but keeping vertical hinting.
  143. *)
  144. {-$DEFINE NOHORIZONTALHINTING}
  145. (*
  146. Symbol: USEKERNING
  147. -----------------
  148. Enables font kerning when using TextToPath() method.
  149. Kerning is the process of adjusting the spacing between characters in a
  150. proportional font, usually to achieve a visually pleasing result. However,
  151. parsing for kerning pairs is quite expensive in terms of CPU usage while the
  152. effect is often very little. Thus kerning is not enabled by default.
  153. *)
  154. {-$DEFINE USEKERNING}
  155. {-$DEFINE TEST_BLENDMEMRGB128SSE4}
  156. {$define GR32_WRAPMODE_REFLECT}
  157. // MMX (and EMMX) is no longer supported on any platform.
  158. {$define OMIT_MMX}