View | Details | Raw Unified | Return to bug 158573
Collapse All | Expand All

(-)src/ftbench.c.old (+32 lines)
Lines 20-25 Link Here
20
#include FT_CACHE_CHARMAP_H
20
#include FT_CACHE_CHARMAP_H
21
#include FT_CACHE_IMAGE_H
21
#include FT_CACHE_IMAGE_H
22
#include FT_CACHE_SMALL_BITMAPS_H
22
#include FT_CACHE_SMALL_BITMAPS_H
23
#include FT_SYNTHESIS_H
23
24
24
25
25
#ifdef UNIX
26
#ifdef UNIX
Lines 79-84 Link Here
79
  FT_BENCH_CMAP,
80
  FT_BENCH_CMAP,
80
  FT_BENCH_CMAP_ITER,
81
  FT_BENCH_CMAP_ITER,
81
  FT_BENCH_NEW_FACE,
82
  FT_BENCH_NEW_FACE,
83
  FT_BENCH_EMBOLDEN,
82
  N_FT_BENCH
84
  N_FT_BENCH
83
};
85
};
84
86
Lines 90-95 Link Here
90
  "Get glyph index",
92
  "Get glyph index",
91
  "Iterate CMap",
93
  "Iterate CMap",
92
  "Open a new face",
94
  "Open a new face",
95
  "Embolden",
93
  NULL
96
  NULL
94
};
97
};
95
98
Lines 245-250 Link Here
245
  return done;
248
  return done;
246
}
249
}
247
250
251
int
252
test_embolden( btimer_t*  timer,
253
             FT_Face    face,
254
             void*      user_data )
255
{
256
  int  i, done = 0;
257
258
259
  FT_UNUSED( user_data );
260
261
  for ( i = 0; i < face->num_glyphs; i++ )
262
  {
263
    if ( FT_Load_Glyph( face, i, load_flags ) )
264
      continue;
265
266
    TIMER_START( timer );
267
    FT_GlyphSlot_Embolden ( face->glyph );
268
    done++;
269
    TIMER_STOP( timer );
270
  }
271
272
  return done;
273
}
274
248
275
249
int
276
int
250
test_get_glyph( btimer_t*  timer,
277
test_get_glyph( btimer_t*  timer,
Lines 793-798 Link Here
793
      test.bench = test_new_face;
820
      test.bench = test_new_face;
794
      benchmark( face, &test, max_iter, max_time );
821
      benchmark( face, &test, max_iter, max_time );
795
      break;
822
      break;
823
    case FT_BENCH_EMBOLDEN:
824
      test.title = "Embolden";
825
      test.bench = test_embolden;
826
      benchmark( face, &test, max_iter, max_time );
827
      break;
796
    }
828
    }
797
  }
829
  }
798
830

Return to bug 158573