... |
... |
@@ -469,10 +469,8 @@ typedef ptrdiff_t FT_PtrDist; |
469
|
469
|
} TPixmap;
|
470
|
470
|
|
471
|
471
|
/* maximum number of gray cells in the buffer */
|
472
|
|
-#if FT_RENDER_POOL_SIZE > 2048
|
|
472
|
+#if defined( FT_GRAY_POOL_SIZE ) && FT_GRAY_POOL_SIZE > 2048
|
473
|
473
|
#define FT_MAX_GRAY_POOL ( FT_RENDER_POOL_SIZE / sizeof ( TCell ) )
|
474
|
|
-#else
|
475
|
|
-#define FT_MAX_GRAY_POOL ( 2048 / sizeof ( TCell ) )
|
476
|
474
|
#endif
|
477
|
475
|
|
478
|
476
|
/* FT_Span buffer size for direct rendering only */
|
... |
... |
@@ -2011,9 +2009,30 @@ typedef ptrdiff_t FT_PtrDist; |
2011
|
2009
|
int continued = 0;
|
2012
|
2010
|
|
2013
|
2011
|
|
2014
|
|
- size = gray_taxi( RAS_VAR ) +
|
2015
|
|
- height * sizeof ( PCell ) / sizeof ( TCell ) +
|
2016
|
|
- 9; /* empirical extra for local extrema */
|
|
2012
|
+ size = gray_taxi( RAS_VAR );
|
|
2013
|
+
|
|
2014
|
+ /* taxicab perimeters in excess of 20 CBox perimeters are */
|
|
2015
|
+ /* not drawn unless in direct mode with possible clipping */
|
|
2016
|
+ if ( !ras.render_span &&
|
|
2017
|
+ size > 20 * 2 * ( ras.max_ex - ras.min_ex + height ) )
|
|
2018
|
+ {
|
|
2019
|
+ FT_TRACE5(( "Blanking on taxi:cbox = %.2lf\n",
|
|
2020
|
+ 0.5 * size / ( ras.max_ex - ras.min_ex + height ) ));
|
|
2021
|
+ return FT_THROW( Ok );
|
|
2022
|
+ }
|
|
2023
|
+
|
|
2024
|
+ size += height * sizeof ( PCell ) / sizeof ( TCell ) +
|
|
2025
|
+ 9; /* empirical extra for local extrema */
|
|
2026
|
+
|
|
2027
|
+#ifdef FT_MAX_GRAY_POOL
|
|
2028
|
+ if ( size > FT_MAX_GRAY_POOL )
|
|
2029
|
+ {
|
|
2030
|
+ /* both divisions rounded up */
|
|
2031
|
+ n = ( size + FT_MAX_GRAY_POOL - 1 ) / FT_MAX_GRAY_POOL;
|
|
2032
|
+ height = ( height + n - 1 ) / n;
|
|
2033
|
+ size = FT_MAX_GRAY_POOL;
|
|
2034
|
+ }
|
|
2035
|
+#endif
|
2017
|
2036
|
|
2018
|
2037
|
if ( FT_QNEW_ARRAY( buffer, size ) )
|
2019
|
2038
|
return error;
|