freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 765ba6b: * src/ftbench.c: Relocate and undo BBo


From: Werner Lemberg
Subject: [freetype2-demos] master 765ba6b: * src/ftbench.c: Relocate and undo BBox rotations.
Date: Mon, 14 Nov 2022 10:41:26 -0500 (EST)

branch: master
commit 765ba6b6c94eecefce8a9de711ebd505c07ff618
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * src/ftbench.c: Relocate and undo BBox rotations.
---
 src/ftbench.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/ftbench.c b/src/ftbench.c
index 339bd79..c638823 100644
--- a/src/ftbench.c
+++ b/src/ftbench.c
@@ -533,14 +533,11 @@
                  void*      user_data )
   {
     FT_BBox    bbox;
-    FT_Matrix  rot30 = { 0xDDB4, -0x8000, 0x8000, 0xDDB4 };
 
     int  i, done = 0;
 
     FT_UNUSED( user_data );
 
-    /* rotate outlines by 30 degrees so that CBox and BBox are different */
-    FT_Set_Transform( face, &rot30, NULL );
 
     FOREACH( i )
     {
@@ -1477,7 +1474,15 @@
       case FT_BENCH_GET_BBOX:
         test.title = "Get_BBox";
         test.bench = test_get_bbox;
-        benchmark( face, &test, max_iter, max_time );
+        {
+          FT_Matrix  rot30 = { 0xDDB4, -0x8000, 0x8000, 0xDDB4 };
+
+
+          /* rotate outlines by 30 degrees so that CBox and BBox are different 
*/
+          FT_Set_Transform( face, &rot30, NULL );
+          benchmark( face, &test, max_iter, max_time );
+          FT_Set_Transform( face, NULL, NULL );
+        }
         break;
 
       case FT_BENCH_CMAP:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]