summaryrefslogtreecommitdiff
path: root/libs/cairo-1.16.0/perf/micro/twin.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
committersanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
commitf1fe73d1909a2448a004a88362a1a532d0d4f7c3 (patch)
treeab37ae3837e2f858de2932bcee9f26e69fab3db1 /libs/cairo-1.16.0/perf/micro/twin.c
parentf567ea1e2798fd3156a416e61f083ea3e6b95719 (diff)
switch to tinyobj and nanovg from assimp and cairo
Diffstat (limited to 'libs/cairo-1.16.0/perf/micro/twin.c')
-rw-r--r--libs/cairo-1.16.0/perf/micro/twin.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/libs/cairo-1.16.0/perf/micro/twin.c b/libs/cairo-1.16.0/perf/micro/twin.c
deleted file mode 100644
index 99433bd..0000000
--- a/libs/cairo-1.16.0/perf/micro/twin.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#define WIDTH 1350
-#define HEIGHT 900
-
-#include "cairo-perf.h"
-
-static cairo_time_t
-do_twin (cairo_t *cr,
- int width,
- int height,
- int loops)
-{
- int i, j, h;
- unsigned char s[2] = {0, 0};
-
- cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
- cairo_paint (cr);
- cairo_set_source_rgb (cr, 0, 0, 0);
-
- cairo_select_font_face (cr,
- "@cairo:",
- CAIRO_FONT_SLANT_NORMAL,
- CAIRO_FONT_WEIGHT_NORMAL);
-
- cairo_perf_timer_start ();
-
- while (loops--) {
- h = 2;
- for (i = 8; i < 48; i >= 24 ? i+=3 : i++) {
- cairo_set_font_size (cr, i);
- for (j = 33; j < 128; j++) {
- if (j == 33 || (j == 80 && i > 24)) {
- h += i + 2;
- cairo_move_to (cr, 10, h);
- }
- s[0] = j;
- cairo_text_path (cr, (const char *) s);
- }
- }
- cairo_fill (cr);
- }
-
- cairo_perf_timer_stop ();
- return cairo_perf_timer_elapsed ();
-}
-
-cairo_bool_t
-twin_enabled (cairo_perf_t *perf)
-{
- return cairo_perf_can_run (perf, "twin", NULL);
-}
-
-void
-twin (cairo_perf_t *perf,
- cairo_t *cr,
- int width,
- int height)
-{
- cairo_perf_run (perf, "twin", do_twin, NULL);
-}