Skip to content

Draft: Optimized pattern drawing in MkModPlayer

Ghost User requested to merge gh-b77c0252/360/unknown/trackeroptdev into develop

Created by: vavency

What

  • Consolidated fillText calls into 6 calls instead of 1 + 6 * numberOfChannels per row
  • Not redrawing the whole pattern every tick.
  • Not drawing the pattern when the row and pattern are the same.
  • Using CSS to move the pattern up and down.

Why

The old drawing function was abusing fillText causing horrible slowdown on lower and old machines.

Additional info (optional)

When the pattern is hidden chromium seems to shift the pattern down, this is caused by the canvas being changed out to a less tall one.

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Merge request reports