feat: add particle static CPU fast path
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
This commit is contained in:
@@ -1102,10 +1102,7 @@ void RenderRasterParticleLayer::evaluate(const PropertyEvaluationParameters&) {
|
||||
}
|
||||
|
||||
bool RenderRasterParticleLayer::needsRepaint() const {
|
||||
const auto& properties = static_cast<const style::ParticleRenderLayerProperties&>(*evaluatedProperties);
|
||||
if (!properties.active || (formalSource && (!sourceField || !sourceNextField)) ||
|
||||
baseImpl->visibility == style::VisibilityType::None)
|
||||
return false;
|
||||
if (!isParticleAnimationActive()) return false;
|
||||
const bool repaint = !formalSource ||
|
||||
(sourceUsesV4Projection
|
||||
? sourceV4Cadence && sourceV4Cadence->cadenceDue(std::chrono::steady_clock::now())
|
||||
@@ -1114,6 +1111,14 @@ bool RenderRasterParticleLayer::needsRepaint() const {
|
||||
return repaint;
|
||||
}
|
||||
|
||||
bool RenderRasterParticleLayer::isParticleAnimationActive() const {
|
||||
const auto& properties = static_cast<const style::ParticleRenderLayerProperties&>(*evaluatedProperties);
|
||||
if (!properties.active || (formalSource && (!sourceField || !sourceNextField)) ||
|
||||
baseImpl->visibility == style::VisibilityType::None)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RenderRasterParticleLayer::needsHiddenLayerSourceCleanup(const RenderSource& renderSource) const {
|
||||
if (!formalSource || !gpuResources || renderSource.baseImpl->type != style::SourceType::RasterArray) return false;
|
||||
const auto& source = static_cast<const RenderRasterArraySource&>(renderSource);
|
||||
|
||||
Reference in New Issue
Block a user