[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 8c5ec8dd6: [raster] Increase the raster pool density.
From: |
Werner Lemberg |
Subject: |
[freetype2] master 8c5ec8dd6: [raster] Increase the raster pool density. |
Date: |
Mon, 23 Oct 2023 23:00:34 -0400 (EDT) |
branch: master
commit 8c5ec8dd63ffd3f76ba0531dda15d2993ab0f20b
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Increase the raster pool density.
This only helps to delay the pool overflow and bisections to larger
sizes and benefits only very intricate glyphs at reasonable sizes.
* src/raster/ftraster.c (TProfile): Use Int instead of Long or PLong
when it is sufficient.
(New_Profile, End_Profuile, Bezier_Up, Sort): Updated accordingly.
---
src/raster/ftraster.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 33689afd2..a06e16d35 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -338,9 +338,9 @@
PProfile link; /* link to next profile (various purposes) */
PProfile next; /* next profile in same contour, used */
/* during drop-out control */
- PLong offset; /* start of profile's data in render pool */
- Long height; /* profile's height in scanlines */
- Long start; /* profile's starting scanline */
+ Int offset; /* bottom or currently scanned array index */
+ Int height; /* profile's height in scanlines */
+ Int start; /* profile's starting scanline */
UShort flags; /* Bit 0-2: drop-out mode */
/* Bit 3: profile orientation (up/down) */
/* Bit 4: is top profile? */
@@ -667,7 +667,6 @@
}
ras.cProfile->height = 0;
- ras.cProfile->offset = ras.top;
}
ras.cProfile->flags = ras.dropOutControl;
@@ -722,7 +721,7 @@
End_Profile( RAS_ARGS Bool overshoot )
{
PProfile p = ras.cProfile;
- Long h = (Long)( ras.top - p->offset );
+ Int h = (Int)( ras.top - p->x );
Int bottom, top;
@@ -735,7 +734,7 @@
if ( h > 0 )
{
- FT_TRACE7(( " ending profile %p, start = %2ld, height = %+3ld\n",
+ FT_TRACE7(( " ending profile %p, start = %2d, height = %+3d\n",
(void *)p, p->start, p->flags & Flow_Up ? h : -h ));
if ( overshoot )
@@ -750,19 +749,20 @@
if ( p->flags & Flow_Up )
{
- bottom = (Int)p->start;
- top = (Int)( p->start + h - 1 );
+ bottom = p->start;
+ top = bottom + h;
+ p->offset = 0;
}
else
{
- bottom = (Int)( p->start - h + 1 );
- top = (Int)p->start;
- p->start = bottom;
- p->offset += h - 1;
+ top = p->start + 1;
+ bottom = top - h;
+ p->start = bottom;
+ p->offset = h - 1;
}
- if ( Insert_Y_Turn( RAS_VARS bottom ) ||
- Insert_Y_Turn( RAS_VARS top + 1 ) )
+ if ( Insert_Y_Turn( RAS_VARS bottom ) ||
+ Insert_Y_Turn( RAS_VARS top ) )
return FAILURE;
if ( !ras.gProfile )
@@ -1181,7 +1181,7 @@
if ( ras.fresh )
{
- ras.cProfile->start = TRUNC( e0 );
+ ras.cProfile->start = (Int)TRUNC( e0 );
ras.fresh = FALSE;
}
@@ -2074,7 +2074,7 @@
current = *list;
while ( current )
{
- current->X = *current->offset;
+ current->X = current->x[current->offset];
current->offset += ( current->flags & Flow_Up ) ? 1 : -1;
current->height--;
current = current->link;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 8c5ec8dd6: [raster] Increase the raster pool density.,
Werner Lemberg <=