Changes in uspace/lib/ipcgfx/src/client.c [7470d97:afcf704] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ipcgfx/src/client.c
r7470d97 rafcf704 1 1 /* 2 * Copyright (c) 20 21Jiri Svoboda2 * Copyright (c) 2019 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 45 45 #include "../private/client.h" 46 46 47 static errno_t ipc_gc_set_clip_rect(void *, gfx_rect_t *);48 47 static errno_t ipc_gc_set_color(void *, gfx_color_t *); 49 48 static errno_t ipc_gc_fill_rect(void *, gfx_rect_t *); 50 static errno_t ipc_gc_update(void *);51 49 static errno_t ipc_gc_bitmap_create(void *, gfx_bitmap_params_t *, 52 50 gfx_bitmap_alloc_t *, void **); … … 56 54 57 55 gfx_context_ops_t ipc_gc_ops = { 58 .set_clip_rect = ipc_gc_set_clip_rect,59 56 .set_color = ipc_gc_set_color, 60 57 .fill_rect = ipc_gc_fill_rect, 61 .update = ipc_gc_update,62 58 .bitmap_create = ipc_gc_bitmap_create, 63 59 .bitmap_destroy = ipc_gc_bitmap_destroy, … … 66 62 }; 67 63 68 /** Set clipping rectangle on IPC GC.69 *70 * @param arg IPC GC71 * @param rect Rectangle72 *73 * @return EOK on success or an error code74 */75 static errno_t ipc_gc_set_clip_rect(void *arg, gfx_rect_t *rect)76 {77 ipc_gc_t *ipcgc = (ipc_gc_t *) arg;78 async_exch_t *exch;79 errno_t rc;80 81 exch = async_exchange_begin(ipcgc->sess);82 if (rect != NULL) {83 rc = async_req_4_0(exch, GC_SET_CLIP_RECT, rect->p0.x, rect->p0.y,84 rect->p1.x, rect->p1.y);85 } else {86 rc = async_req_0_0(exch, GC_SET_CLIP_RECT_NULL);87 }88 89 async_exchange_end(exch);90 91 return rc;92 }93 94 64 /** Set color on IPC GC. 95 65 * … … 133 103 rc = async_req_4_0(exch, GC_FILL_RECT, rect->p0.x, rect->p0.y, 134 104 rect->p1.x, rect->p1.y); 135 async_exchange_end(exch);136 137 return rc;138 }139 140 /** Update display on IPC GC.141 *142 * @param arg IPC GC143 *144 * @return EOK on success or an error code145 */146 static errno_t ipc_gc_update(void *arg)147 {148 ipc_gc_t *ipcgc = (ipc_gc_t *) arg;149 async_exch_t *exch;150 errno_t rc;151 152 exch = async_exchange_begin(ipcgc->sess);153 rc = async_req_0_0(exch, GC_UPDATE);154 105 async_exchange_end(exch); 155 106
Note:
See TracChangeset
for help on using the changeset viewer.