Changeset 2ab8ab3 in mainline for uspace/lib/ipcgfx/src


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/lib/ipcgfx/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ipcgfx/src/client.c

    ref734b7 r2ab8ab3  
    11/*
    2  * Copyright (c) 2019 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4747static errno_t ipc_gc_set_color(void *, gfx_color_t *);
    4848static errno_t ipc_gc_fill_rect(void *, gfx_rect_t *);
     49static errno_t ipc_gc_update(void *);
    4950static errno_t ipc_gc_bitmap_create(void *, gfx_bitmap_params_t *,
    5051    gfx_bitmap_alloc_t *, void **);
     
    5657        .set_color = ipc_gc_set_color,
    5758        .fill_rect = ipc_gc_fill_rect,
     59        .update = ipc_gc_update,
    5860        .bitmap_create = ipc_gc_bitmap_create,
    5961        .bitmap_destroy = ipc_gc_bitmap_destroy,
     
    103105        rc = async_req_4_0(exch, GC_FILL_RECT, rect->p0.x, rect->p0.y,
    104106            rect->p1.x, rect->p1.y);
     107        async_exchange_end(exch);
     108
     109        return rc;
     110}
     111
     112/** Update display on IPC GC.
     113 *
     114 * @param arg IPC GC
     115 *
     116 * @return EOK on success or an error code
     117 */
     118static errno_t ipc_gc_update(void *arg)
     119{
     120        ipc_gc_t *ipcgc = (ipc_gc_t *) arg;
     121        async_exch_t *exch;
     122        errno_t rc;
     123
     124        exch = async_exchange_begin(ipcgc->sess);
     125        rc = async_req_0_0(exch, GC_UPDATE);
    105126        async_exchange_end(exch);
    106127
  • uspace/lib/ipcgfx/src/server.c

    ref734b7 r2ab8ab3  
    11/*
    2  * Copyright (c) 2019 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    8686}
    8787
     88static void gc_update_srv(ipc_gc_srv_t *srvgc, ipc_call_t *call)
     89{
     90        errno_t rc;
     91
     92        rc = gfx_update(srvgc->gc);
     93        async_answer_0(call, rc);
     94}
     95
    8896static void gc_bitmap_create_srv(ipc_gc_srv_t *srvgc, ipc_call_t *icall)
    8997{
     
    358366                case GC_FILL_RECT:
    359367                        gc_fill_rect_srv(&srvgc, &call);
     368                        break;
     369                case GC_UPDATE:
     370                        gc_update_srv(&srvgc, &call);
    360371                        break;
    361372                case GC_BITMAP_CREATE:
Note: See TracChangeset for help on using the changeset viewer.