perf(性能优化): 优化资源读写与字体图像处理
build.yaml / build (push) Successful in 9m22s

This commit is contained in:
xiaoqidun committed 2026-10-14 08:22:31 +08:00
1 parent 21bd592358
commit bec13d523f
47 files changed
+1455 -539

No files matched your search

+14 -2
View File
@@ -393,12 +393,24 @@ func reduceRepeatedNonZeroPath(path *canvas.Path) *canvas.Path {
// 入参: path 非零填充描边, clip 裁剪路径
// 返回: *canvas.Path 绘制轮廓
func applyFillClipPath(path, clip *canvas.Path) *canvas.Path {
if path != nil && clip != nil && len(path.Data()) >= 64 {
if path == nil || clip == nil {
return path
}
if rect, ok := rectangularPath(clip); ok {
bounds := path.Bounds()
if rect.Contains(bounds) {
return path
}
if !rect.Overlaps(bounds) {
return &canvas.Path{}
}
}
if len(path.Data()) >= 64 {
if result, ok := intersectLinearCanvasContours(path, clip); ok {
return result
}
}
if path != nil && clip != nil && path.HasSubpaths() && len(path.Split()) >= 8 {
if path.HasSubpaths() && len(path.Split()) >= 8 {
if result, ok := intersectCanvasContours(path, clip); ok {
return result
}