Changeset 8aef01c in mainline for uspace/srv/hid/display/main.c


Ignore:
Timestamp:
2020-06-07T10:18:14Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a65b0c8
Parents:
6301a24f
git-author:
Jiri Svoboda <jiri@…> (2020-06-07 10:11:32)
git-committer:
Jiri Svoboda <jiri@…> (2020-06-07 10:18:14)
Message:

Configurable display double-buffering

On by default (since turning off creates flicker in the absence of
front-to-back rendering). This is the quick and dirty way: display
server renders locally to a bitmap (using mem GC) and renders the
bitmap when ready.

The more sophisticated way would be to implement buffering in the
display device. That would require, however, enhancing the protocols
to communicate frame boundaries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    r6301a24f r8aef01c  
    5959static void display_client_ev_pending(void *);
    6060
     61#ifdef CONFIG_DISP_DOUBLE_BUF
     62/*
     63 * Double buffering is one way to provide flicker-free display.
     64 */
     65static ds_display_flags_t disp_flags = df_disp_double_buf;
     66#else
     67/*
     68 * With double buffering disabled, wet screen flicker since front-to-back
     69 * rendering is not implemented.
     70 */
     71static ds_display_flags_t disp_flags = df_none;
     72#endif
     73
    6174static ds_client_cb_t display_client_cb = {
    6275        .ev_pending = display_client_ev_pending
     
    8194        log_msg(LOG_DEFAULT, LVL_DEBUG, "display_srv_init()");
    8295
    83         rc = ds_display_create(NULL, &disp);
     96        rc = ds_display_create(NULL, disp_flags, &disp);
    8497        if (rc != EOK)
    8598                goto error;
Note: See TracChangeset for help on using the changeset viewer.