Skip to content
Snippets Groups Projects
Commit 95c12e38 authored by pippin's avatar pippin Committed by pippin
Browse files

ctx: tune fast path settings

parent bd28a6e9
No related branches found
No related tags found
1 merge request!99ctx: tune fast path settings
Pipeline #6434 passed
/* ctx git commit: e460cf76 */
/* ctx git commit: 4349079e */
/*
* ctx.h is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -5007,6 +5007,10 @@ static inline CtxList *ctx_list_find_custom (CtxList *list,
a ~15-20% performance win can be seen. */
#endif
 
#ifndef CTX_FAST_STROKE_RECT
#define CTX_FAST_STROKE_RECT 0
#endif
 
#ifndef CTX_COMPOSITING_GROUPS
#define CTX_COMPOSITING_GROUPS 1
......@@ -5775,7 +5779,7 @@ static inline CtxList *ctx_list_find_custom (CtxList *list,
#endif
 
#ifndef CTX_STROKE_1PX
#define CTX_STROKE_1PX 1
#define CTX_STROKE_1PX 0
#endif
 
/* Copyright (C) 2020 Øyvind Kolås <pippin@gimp.org>
......@@ -18733,6 +18737,8 @@ CTX_SIMD_SUFFIX (ctx_composite_fill_rect) (CtxRasterizer *rasterizer,
}
}
 
#endif
#if CTX_FAST_STROKE_RECT
void
CTX_SIMD_SUFFIX(ctx_composite_stroke_rect) (CtxRasterizer *rasterizer,
float x0,
......@@ -18837,9 +18843,9 @@ CTX_SIMD_SUFFIX(ctx_composite_stroke_rect) (CtxRasterizer *rasterizer,
x0+hw, y1+hw, 255);
}
}
#endif
 
 
#endif
 
static void
CTX_SIMD_SUFFIX (ctx_composite_setup) (CtxRasterizer *rasterizer)
......@@ -20823,6 +20829,8 @@ void CTX_SIMD_SUFFIX(ctx_simd_setup)(void)
ctx_rasterizer_rasterize_edges = CTX_SIMD_SUFFIX(ctx_rasterizer_rasterize_edges);
#if CTX_FAST_FILL_RECT
ctx_composite_fill_rect = CTX_SIMD_SUFFIX(ctx_composite_fill_rect);
#endif
#if CTX_FAST_STROKE_RECT
ctx_composite_stroke_rect = CTX_SIMD_SUFFIX(ctx_composite_stroke_rect);
#endif
}
......@@ -22200,7 +22208,7 @@ ctx_rasterizer_stroke (CtxRasterizer *rasterizer)
 
CtxSegment temp[count]; /* copy of already built up path's poly line */
memcpy (temp, rasterizer->edge_list.entries, sizeof (temp) );
#if 0
#if CTX_FAST_FILL_RECT
if (rasterizer->edge_list.count == 5)
{
......@@ -22229,6 +22237,7 @@ ctx_rasterizer_stroke (CtxRasterizer *rasterizer)
goto done;
}
}
#endif
#endif
{
......@@ -22449,7 +22458,7 @@ foo:
}
}
#if CTX_FAST_FILL_RECT
done:
//done:
#endif
if (preserved)
{
......@@ -55904,7 +55913,7 @@ void (*ctx_rasterizer_rasterize_edges) (CtxRasterizer *rasterizer, const int fil
 
void (*ctx_composite_setup) (CtxRasterizer *rasterizer) =
ctx_composite_setup_generic;
#if CTX_FAST_FILL_RECT
#if CTX_FAST_STROKE_RECT
void (*ctx_composite_stroke_rect) (CtxRasterizer *rasterizer,
float x0,
float y0,
......@@ -55912,7 +55921,9 @@ void (*ctx_composite_stroke_rect) (CtxRasterizer *rasterizer,
float y1,
float line_width) =
ctx_composite_stroke_rect_generic;
#endif
 
#if CTX_FAST_FILL_RECT
void (*ctx_composite_fill_rect) (CtxRasterizer *rasterizer,
float x0,
float y0,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment