feat(渲染压缩): 完善三维渲染并优化转换压缩
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-08 10:21:17 +08:00
1 parent c8a163a077
commit 0351dd54f5
31 files changed
+993 -311

No files matched your search

+22 -3
View File
@@ -24,9 +24,10 @@ type pdfCompositeBuffers[T any] [8][]T
// pdfCompositeScratch 复用像素及蒙版缓冲,不跨页持有活动内容
type pdfCompositeScratch struct {
pixels pdfCompositeBuffers[pdfCompositePixel]
masks pdfCompositeBuffers[float64]
rasters [8]*image.RGBA
pixels pdfCompositeBuffers[pdfCompositePixel]
masks pdfCompositeBuffers[float64]
channels pdfCompositeBuffers[uint8]
rasters [8]*image.RGBA
}
// acquireCoverage 借用当前块的独占画布,保留活动画布供嵌套合成读取
@@ -121,6 +122,24 @@ func (c *pdfCompositor) releasePixels(pixels []pdfCompositePixel) {
}
}
// acquireChannels 借用图案通道标记,仅在设备函数需要时分配
// 入参: count 当前块像素数
// 返回: []uint8 尚未初始化的独占通道缓冲
func (c *pdfCompositor) acquireChannels(count int) []uint8 {
if c.scratch == nil {
c.scratch = &pdfCompositeScratch{}
}
return c.scratch.channels.acquire(count)
}
// releaseChannels 归还不再参与嵌套合成的通道标记
// 入参: channels 当前调用借用的通道缓冲
func (c *pdfCompositor) releaseChannels(channels []uint8) {
if c.scratch != nil {
c.scratch.channels.release(channels)
}
}
// releaseMasks 在当前块绘制结束后归还蒙版结果,不复用其他块的坐标缓存
func (c *pdfCompositor) releaseMasks() {
if c.scratch != nil {