Skip to content

DamageTracker with a static mode source, decoupled from OutputModeSource #1983

@YaLTeR

Description

@YaLTeR

I think it would make sense to have a DamageTracker with an always-static mode source (a method to update it, and and method to get it without unwraps) and make OutputDamageTracker a simple wrapper around DamageTracker with an OutputModeSource that has the error conditions. Since DamageTracker is used in various screencopy, screencast and offscreen cases where the mode is always static, and the unwraps are annoying.

I'd need to re-check the source but in my mind the idea is simple: there's 1 line in the damage tracker methods that fallibly converts OutputModeSource into a concrete mode -- move that thing into an otherwise trivial wrapper struct (new OutputDamageTracker), and keep the rest of the damage tracker with a static mode source.

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