Skip to content
Snippets Groups Projects

Optimized pattern drawing in MkModPlayer

Merged Vavency requested to merge (removed):trackeroptdev into develop

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.
  • Hide the pattern if the slowdown is noticeable.

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.

Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
  • I have made sure to test this pull request
Edited by Vavency

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading