Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7470d97 in mainline for uspace/lib/ipcgfx/src/server.c


Ignore:
Timestamp:
2021-04-30T15:05:06Z (7 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
051349b
Parents:
252d03c
Message:

Add GC operation to set clipping rectangle

The number of changed files is due to the proliferation of GC
implementations, mostly these are just dummies in unit tests.
Definitely need to tame those in the future.

File:
1 edited

Legend:

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

    r252d03c r7470d97  
    5252static ipc_gc_srv_bitmap_t *gc_bitmap_lookup(ipc_gc_srv_t *, sysarg_t);
    5353
     54static void gc_set_clip_rect_srv(ipc_gc_srv_t *srvgc, ipc_call_t *call)
     55{
     56        gfx_rect_t rect;
     57        errno_t rc;
     58
     59        rect.p0.x = ipc_get_arg1(call);
     60        rect.p0.y = ipc_get_arg2(call);
     61        rect.p1.x = ipc_get_arg3(call);
     62        rect.p1.y = ipc_get_arg4(call);
     63
     64        rc = gfx_set_clip_rect(srvgc->gc, &rect);
     65        async_answer_0(call, rc);
     66}
     67
     68static void gc_set_clip_rect_null_srv(ipc_gc_srv_t *srvgc, ipc_call_t *call)
     69{
     70        errno_t rc;
     71
     72        rc = gfx_set_clip_rect(srvgc->gc, NULL);
     73        async_answer_0(call, rc);
     74}
     75
    5476static void gc_set_rgb_color_srv(ipc_gc_srv_t *srvgc, ipc_call_t *call)
    5577{
     
    361383
    362384                switch (method) {
     385                case GC_SET_CLIP_RECT:
     386                        gc_set_clip_rect_srv(&srvgc, &call);
     387                        break;
     388                case GC_SET_CLIP_RECT_NULL:
     389                        gc_set_clip_rect_null_srv(&srvgc, &call);
     390                        break;
    363391                case GC_SET_RGB_COLOR:
    364392                        gc_set_rgb_color_srv(&srvgc, &call);
Note: See TracChangeset for help on using the changeset viewer.