Skip to content

RenderPipeline.mergeContexts is slow #502

Open
@defr0zen

Description

@defr0zen

When working on high zooms, this method seems to render huge source canvases on small destination canvas.

  • Add a big image to the project - 1000x1000
  • Make an image 50% transparent
  • Zoom in to 800% so that the image is in the viewport
  • Try to do anything, the animation frames are 500ms

In my case, source.canvas was 20000x20000

    private mergeContexts(dest, source) {
        var sx = -(source._relativeOffsetX || 0);
        var sy = -(source._relativeOffsetY || 0);

        dest.save();
        // resetTransform set relativeOffset on destinantion context
        dest.resetTransform();
        dest.drawImage(source.canvas, sx, sy);
        dest.restore();
    }

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions