Loading the wall causes the canvas renderer to stutter #83

Open
opened 2024-09-03 23:04:21 +02:00 by liquidev · 0 comments
liquidev commented 2024-09-03 23:04:21 +02:00 (Migrated from github.com)

This is probably because we're doing a stupid roundtrip after decoding the received image. Instead of decoding the WebP and writing it as canvas data directly, we instead:

  • Update an OffscreenCanvas, which we need to extract pixels from the ImageBitmap.
  • Update the haku Pixmap.
  • Update the WebGL image from the haku Pixmap.

I'm not sure which is the slowest here, but it uses a lot more memory than needed, and duplicates a lot of work. I wonder what we can do to make this faster.

This is probably because we're doing a stupid roundtrip after decoding the received image. Instead of decoding the WebP and writing it as canvas data directly, we instead: - Update an `OffscreenCanvas`, which we need to extract pixels from the `ImageBitmap`. - Update the haku `Pixmap`. - Update the WebGL image from the haku `Pixmap`. I'm not sure which is the slowest here, but it uses a lot more memory than needed, and duplicates a lot of work. I wonder what we can do to make this faster.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: liquidex/rkgk#83
No description provided.