Skip to content

New update_mode 'auto'? #189

@almarklein

Description

@almarklein

With #188 in mind, I got the idea that we could have an 'auto' update mode, that would be like 'ondemand', but would automatically issue a new draw for most incoming events, but e.g. for pointer_move only when a button is held down. This would mean that any application that does not have stuff that changes by itself---i.e. things only change in reaction to events---it just works.

I can imagine that people use 'continuous' to avoid problem when forgetting a request_draw() somewhere. With 'auto' this would be less of a problem, sparing battery live for possibly a lot of people :)

A possible downside is that the use of request_draw() may become less common, and less known.

Possible documentation could be:

  • use 'ondemand' for full control when drawing happens; use request_draw() when needed.
  • use 'auto' when your rendering only changes in reaction to events. You can still use request_draw when needed (e.g. short-lived animations).
  • use 'continuous' when you want to draw continuously, e.g. when you have animations.
  • use 'fastest' when you don't care about battery life and want the FPS to be as high as possible.

cc @Korijn

edit: fixed 'on_demand'->'ondemand'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions