Skip to content

Expose willReadFrequently attribute for Canvas2D to improve performance and avoid warnings #1690

@Poobslag

Description

@Poobslag

I am developing an HTML5 game with HaxeFlixel and get numerous warnings in Chrome's developer console:

ImageCanvasUtil.hx:212 Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently

This 'willReadFrequently' attribute is not set by ImageCanvasUtil.hx and I do not see any way to set this attribute with the current API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions