mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-27 16:47:00 +00:00
renderer: enable stroker dash path for wgpu engine
Some checks are pending
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
Some checks are pending
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
just feature extension by:
bada5691bc
This commit is contained in:
parent
f6415b9c4d
commit
3d8f492180
1 changed files with 8 additions and 7 deletions
|
@ -593,8 +593,8 @@ bool RenderTrimPath::trim(const RenderPath& in, RenderPath& out) const
|
||||||
/* StrokeDashPath Class Implementation */
|
/* StrokeDashPath Class Implementation */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
//TODO: use this common function from all engines
|
//TODO: use this common function from sw engine
|
||||||
#ifdef THORVG_GL_RASTER_SUPPORT
|
#if defined(THORVG_GL_RASTER_SUPPORT) || defined(THORVG_WG_RASTER_SUPPORT)
|
||||||
|
|
||||||
struct StrokeDashPath
|
struct StrokeDashPath
|
||||||
{
|
{
|
||||||
|
@ -770,14 +770,12 @@ void StrokeDashPath::cubicTo(RenderPath& out, const Point& cnt1, const Point& cn
|
||||||
end
|
end
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool RenderShape::strokeDash(RenderPath& out) const
|
bool RenderShape::strokeDash(RenderPath& out) const
|
||||||
{
|
{
|
||||||
if (!stroke || stroke->dash.count == 0 || stroke->dash.length < DASH_PATTERN_THRESHOLD) return false;
|
if (!stroke || stroke->dash.count == 0 || stroke->dash.length < DASH_PATTERN_THRESHOLD) return false;
|
||||||
|
|
||||||
//TODO: use this common function from all engines
|
|
||||||
#ifdef THORVG_GL_RASTER_SUPPORT
|
|
||||||
out.cmds.reserve(20 * path.cmds.count);
|
out.cmds.reserve(20 * path.cmds.count);
|
||||||
out.pts.reserve(20 * path.pts.count);
|
out.pts.reserve(20 * path.pts.count);
|
||||||
|
|
||||||
|
@ -790,7 +788,10 @@ bool RenderShape::strokeDash(RenderPath& out) const
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
return dash.gen(path, out, allowDot);
|
return dash.gen(path, out, allowDot);
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
bool RenderShape::strokeDash(RenderPath& out) const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Add table
Reference in a new issue