Changes in uspace/lib/ui/src/dummygc.c [f7a90df:7470d97] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/dummygc.c
rf7a90df r7470d97 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 41 41 #include "../private/dummygc.h" 42 42 43 static errno_t dummygc_set_clip_rect(void *, gfx_rect_t *); 43 44 static errno_t dummygc_set_color(void *, gfx_color_t *); 44 45 static errno_t dummygc_fill_rect(void *, gfx_rect_t *); 46 static errno_t dummygc_update(void *); 45 47 static errno_t dummygc_bitmap_create(void *, gfx_bitmap_params_t *, 46 48 gfx_bitmap_alloc_t *, void **); … … 51 53 /** Dummy GC operations */ 52 54 gfx_context_ops_t dummygc_ops = { 55 .set_clip_rect = dummygc_set_clip_rect, 53 56 .set_color = dummygc_set_color, 54 57 .fill_rect = dummygc_fill_rect, 58 .update = dummygc_update, 55 59 .bitmap_create = dummygc_bitmap_create, 56 60 .bitmap_destroy = dummygc_bitmap_destroy, … … 105 109 } 106 110 111 /** Set clipping rectangle on dummy GC 112 * 113 * @param arg Argument (dummy_gc_t) 114 * @param rect Rectangle 115 * @return EOK on success or an error code 116 */ 117 static errno_t dummygc_set_clip_rect(void *arg, gfx_rect_t *rect) 118 { 119 (void) arg; 120 (void) rect; 121 return EOK; 122 } 123 107 124 /** Set color on dummy GC 108 125 * … … 128 145 (void) arg; 129 146 (void) rect; 147 return EOK; 148 } 149 150 /** Update dummy GC 151 * 152 * @param arg Argument (dummy_gc_t) 153 * @return EOK on success or an error code 154 */ 155 static errno_t dummygc_update(void *arg) 156 { 157 (void) arg; 130 158 return EOK; 131 159 } … … 199 227 { 200 228 dummygc_bitmap_t *tbm = (dummygc_bitmap_t *)bm; 229 201 230 tbm->dgc->bm_rendered = true; 202 tbm->dgc->bm_srect = *srect; 203 tbm->dgc->bm_offs = *offs; 231 232 tbm->dgc->bm_srect.p0.x = 0; 233 tbm->dgc->bm_srect.p0.y = 0; 234 tbm->dgc->bm_srect.p1.x = 0; 235 tbm->dgc->bm_srect.p1.y = 0; 236 237 tbm->dgc->bm_offs.x = 0; 238 tbm->dgc->bm_offs.y = 0; 239 240 if (srect != NULL) 241 tbm->dgc->bm_srect = *srect; 242 243 if (offs != NULL) 244 tbm->dgc->bm_offs = *offs; 245 204 246 return EOK; 205 247 }
Note:
See TracChangeset
for help on using the changeset viewer.