Changeset 2ab8ab3 in mainline for uspace/srv


Ignore:
Timestamp:
2021-02-16T18:12:05Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68a552f
Parents:
ef734b7
Message:

Client-side UI rendering

It is possible to turn on and off and if turned on, one can also
enable or disable window double buffering (currently both options
are build-time).

Location:
uspace/srv/hid/display
Files:
2 edited

Legend:

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

    ref734b7 r2ab8ab3  
    5050
    5151static gfx_context_t *ds_display_get_unbuf_gc(ds_display_t *);
    52 static void ds_display_update_cb(void *, gfx_rect_t *);
     52static void ds_display_invalidate_cb(void *, gfx_rect_t *);
     53static void ds_display_update_cb(void *);
    5354
    5455/** Create display.
     
    459460
    460461        rc = mem_gc_create(&disp->rect, &alloc,
    461             ds_display_update_cb, (void *) disp, &disp->bbgc);
     462            ds_display_invalidate_cb, ds_display_update_cb, (void *) disp,
     463            &disp->bbgc);
    462464        if (rc != EOK)
    463465                goto error;
     
    732734}
    733735
    734 /** Display update callback.
     736/** Display invalidate callback.
    735737 *
    736738 * Called by backbuffer memory GC when something is rendered into it.
     
    740742 * @param rect Rectangle to update
    741743 */
    742 static void ds_display_update_cb(void *arg, gfx_rect_t *rect)
     744static void ds_display_invalidate_cb(void *arg, gfx_rect_t *rect)
    743745{
    744746        ds_display_t *disp = (ds_display_t *) arg;
     
    749751}
    750752
     753/** Display update callback.
     754 *
     755 * @param arg Argument (display cast as void *)
     756 */
     757static void ds_display_update_cb(void *arg)
     758{
     759        ds_display_t *disp = (ds_display_t *) arg;
     760
     761        (void) disp;
     762}
     763
    751764/** @}
    752765 */
  • uspace/srv/hid/display/window.c

    ref734b7 r2ab8ab3  
    4949#include "window.h"
    5050
    51 static void ds_window_update_cb(void *, gfx_rect_t *);
     51static void ds_window_invalidate_cb(void *, gfx_rect_t *);
     52static void ds_window_update_cb(void *);
    5253static void ds_window_get_preview_rect(ds_window_t *, gfx_rect_t *);
    5354
     
    106107        }
    107108
    108         rc = mem_gc_create(&params->rect, &alloc, ds_window_update_cb,
    109             (void *)wnd, &wnd->mgc);
     109        rc = mem_gc_create(&params->rect, &alloc, ds_window_invalidate_cb,
     110            ds_window_update_cb, (void *)wnd, &wnd->mgc);
    110111        if (rc != EOK)
    111112                goto error;
     
    789790}
    790791
    791 /** Window memory GC update callback.
    792  *
    793  * This is called by the window's memory GC when a rectangle us updated.
    794  */
    795 static void ds_window_update_cb(void *arg, gfx_rect_t *rect)
     792/** Window memory GC invalidate callback.
     793 *
     794 * This is called by the window's memory GC when a rectangle is modified.
     795 */
     796static void ds_window_invalidate_cb(void *arg, gfx_rect_t *rect)
    796797{
    797798        ds_window_t *wnd = (ds_window_t *)arg;
     
    806807}
    807808
     809/** Window memory GC update callback.
     810 *
     811 * This is called by the window's memory GC when it is to be updated.
     812 */
     813static void ds_window_update_cb(void *arg)
     814{
     815        ds_window_t *wnd = (ds_window_t *)arg;
     816
     817        (void) wnd;
     818}
     819
    808820/** @}
    809821 */
Note: See TracChangeset for help on using the changeset viewer.