This commit is contained in:
laodaming 2023-09-22 10:49:07 +08:00
parent bb645ce6f6
commit 741963275e

View File

@ -66,10 +66,15 @@ func (w *wsConnectItem) consumeRenderImageData() {
case <-w.closeChan: //已关闭
return
case data := <-w.extendRenderProperty.renderChan: //消费数据
//属性相同则发送渲染,不同则抛弃
if data.RenderData.TemplateTag == w.extendRenderProperty.templateTag && data.RenderData.TemplateTagColor.SelectedColorIndex == w.extendRenderProperty.colorSelectedIndex {
w.renderImage(data)
//属性不同则不发送渲染
if data.RenderData.TemplateTag != w.extendRenderProperty.templateTag {
continue
}
//属性不同则不发送渲染
if data.RenderData.TemplateTagColor.SelectedColorIndex != w.extendRenderProperty.colorSelectedIndex {
continue
}
w.renderImage(data)
}
}
}