mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-09 01:59:30 +01:00
LazUtils: improvements for TTInterp. Patch from circular
git-svn-id: trunk@40428 -
This commit is contained in:
parent
faea508795
commit
c7765210d6
File diff suppressed because it is too large
Load Diff
@ -233,24 +233,24 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TRound_Function = function( distance, compensation : TT_F26dot6 )
|
TRound_Function = function( distance, compensation : TT_F26dot6 )
|
||||||
: TT_F26dot6;
|
: TT_F26dot6 of object;
|
||||||
(* Rounding function, as used by the interpreter *)
|
(* Rounding function, as used by the interpreter *)
|
||||||
|
|
||||||
TMove_Function = procedure( zone : PGlyph_Zone;
|
TMove_Function = procedure( zone : PGlyph_Zone;
|
||||||
point : Int;
|
point : Int;
|
||||||
distance : TT_F26dot6 );
|
distance : TT_F26dot6 ) of object;
|
||||||
(* Point displacement along the freedom vector routine, as *)
|
(* Point displacement along the freedom vector routine, as *)
|
||||||
(* used by the interpreter *)
|
(* used by the interpreter *)
|
||||||
|
|
||||||
TProject_Function = function( var P1, P2 : TT_Vector ) : TT_F26dot6;
|
TProject_Function = function( var P1, P2 : TT_Vector ) : TT_F26dot6 of object;
|
||||||
(* Distance projection along one of the proj. vectors, as used *)
|
(* Distance projection along one of the proj. vectors, as used *)
|
||||||
(* by the interpreter *)
|
(* by the interpreter *)
|
||||||
|
|
||||||
TFunc_Get_CVT = function ( index : Int ) : TT_F26Dot6;
|
TFunc_Get_CVT = function ( index : Int ) : TT_F26Dot6 of object;
|
||||||
(* Reading a cvt value. Take care of non-square pixels when *)
|
(* Reading a cvt value. Take care of non-square pixels when *)
|
||||||
(* needed *)
|
(* needed *)
|
||||||
|
|
||||||
TFunc_Set_CVT = procedure( index : Int; value : TT_F26Dot6 );
|
TFunc_Set_CVT = procedure( index : Int; value : TT_F26Dot6 ) of object;
|
||||||
(* Setting or Moving a cvt value. Take care of non-square *)
|
(* Setting or Moving a cvt value. Take care of non-square *)
|
||||||
(* pixels when needed *)
|
(* pixels when needed *)
|
||||||
|
|
||||||
@ -552,14 +552,11 @@ type
|
|||||||
face : PFace;
|
face : PFace;
|
||||||
instance : PInstance;
|
instance : PInstance;
|
||||||
error : Int;
|
error : Int;
|
||||||
|
interpreter: TObject;
|
||||||
|
|
||||||
stackSize : Int; (* size of instance stack *)
|
stackSize : Int; (* size of instance stack *)
|
||||||
top : Int; (* top of instance stack *)
|
|
||||||
stack : PStorage; (* current instance stack *)
|
stack : PStorage; (* current instance stack *)
|
||||||
|
|
||||||
args : Int; (* number of arguments in opcode *)
|
|
||||||
new_top : Int; (* new stack top after opc. exec *)
|
|
||||||
|
|
||||||
zp0,
|
zp0,
|
||||||
zp1,
|
zp1,
|
||||||
zp2,
|
zp2,
|
||||||
@ -573,9 +570,6 @@ type
|
|||||||
IP : Int; (* current instruction pointer *)
|
IP : Int; (* current instruction pointer *)
|
||||||
codeSize : Int; (* size of current range *)
|
codeSize : Int; (* size of current range *)
|
||||||
|
|
||||||
opcode : Byte; (* current opcode *)
|
|
||||||
length : Int; (* length of current opcode *)
|
|
||||||
|
|
||||||
step_ins : boolean; (* used by the interpreter *)
|
step_ins : boolean; (* used by the interpreter *)
|
||||||
(* if true, go to the next *)
|
(* if true, go to the next *)
|
||||||
(* instruction.. *)
|
(* instruction.. *)
|
||||||
@ -587,7 +581,6 @@ type
|
|||||||
glyphIns : PByte; (* glyph instructions *)
|
glyphIns : PByte; (* glyph instructions *)
|
||||||
glyphSize : Int; (* glyph ins. size *)
|
glyphSize : Int; (* glyph ins. size *)
|
||||||
|
|
||||||
callTop : Int;
|
|
||||||
callSize : Int;
|
callSize : Int;
|
||||||
callStack : PCallStack; (* interpreter call stack *)
|
callStack : PCallStack; (* interpreter call stack *)
|
||||||
|
|
||||||
@ -1092,6 +1085,9 @@ const
|
|||||||
|
|
||||||
with PExec_Context(exec)^ do
|
with PExec_Context(exec)^ do
|
||||||
begin
|
begin
|
||||||
|
interpreter.Free;
|
||||||
|
interpreter := nil;
|
||||||
|
|
||||||
(* Free contours array *)
|
(* Free contours array *)
|
||||||
Free( pts.conEnds );
|
Free( pts.conEnds );
|
||||||
pts.n_contours := 0;
|
pts.n_contours := 0;
|
||||||
@ -1109,7 +1105,6 @@ const
|
|||||||
(* Free call stack *)
|
(* Free call stack *)
|
||||||
Free( callStack );
|
Free( callStack );
|
||||||
callSize := 0;
|
callSize := 0;
|
||||||
callTop := 0;
|
|
||||||
|
|
||||||
(* Free composite load stack *)
|
(* Free composite load stack *)
|
||||||
Free( loadStack );
|
Free( loadStack );
|
||||||
@ -1150,6 +1145,8 @@ const
|
|||||||
with exec^ do
|
with exec^ do
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
interpreter := nil;
|
||||||
|
|
||||||
callSize := 32;
|
callSize := 32;
|
||||||
loadSize := face^.maxComponents + 1;
|
loadSize := face^.maxComponents + 1;
|
||||||
storeSize := face^.MaxProfile.maxStorage;
|
storeSize := face^.MaxProfile.maxStorage;
|
||||||
@ -1216,8 +1213,6 @@ const
|
|||||||
|
|
||||||
with exec^ do
|
with exec^ do
|
||||||
begin
|
begin
|
||||||
top := 0;
|
|
||||||
callTop := 0;
|
|
||||||
zp0 := pts;
|
zp0 := pts;
|
||||||
zp1 := pts;
|
zp1 := pts;
|
||||||
zp2 := pts;
|
zp2 := pts;
|
||||||
@ -1557,8 +1552,6 @@ const
|
|||||||
|
|
||||||
with exec^ do
|
with exec^ do
|
||||||
begin
|
begin
|
||||||
callTop := 0;
|
|
||||||
top := 0;
|
|
||||||
period := 64;
|
period := 64;
|
||||||
phase := 0;
|
phase := 0;
|
||||||
threshold := 0;
|
threshold := 0;
|
||||||
@ -1714,9 +1707,6 @@ const
|
|||||||
|
|
||||||
instruction_trap := False;
|
instruction_trap := False;
|
||||||
|
|
||||||
top := 0;
|
|
||||||
callTop := 0;
|
|
||||||
|
|
||||||
(* all twilight points are originally zero *)
|
(* all twilight points are originally zero *)
|
||||||
for i := 0 to twilight.n_points-1 do
|
for i := 0 to twilight.n_points-1 do
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user