Changeset 71cbe5c in mainline for uspace/lib/ipcgfx/src/client.c
- Timestamp:
- 2019-12-06T17:48:48Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b63dc2
- Parents:
- 87a7cdb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ipcgfx/src/client.c
r87a7cdb r71cbe5c 123 123 gfx_coord2_t dim; 124 124 async_exch_t *exch = NULL; 125 as_area_info_t info; 125 126 ipc_call_t answer; 127 size_t asize; 126 128 aid_t req; 127 129 errno_t rc; … … 148 150 } else { 149 151 /* 150 * XXX We could allow this if the pixels point to a shareable151 * area or we could do a copy of the data when rendering152 * Accept user allocation if it points to a an acceptable 153 * memory area. 152 154 */ 153 rc = ENOTSUP; 154 goto error; 155 rc = as_area_get_info(alloc->pixels, &info); 156 if (rc != EOK) 157 goto error; 158 159 /* Pixels should start at the beginning of the area */ 160 if (info.start_addr != (uintptr_t) alloc->pixels) { 161 rc = EINVAL; 162 goto error; 163 } 164 165 /* Size of area should be size of bitmap rounded up to page size */ 166 asize = PAGES2SIZE(SIZE2PAGES(alloc->pitch * dim.y)); 167 if (info.size != asize) { 168 rc = EINVAL; 169 goto error; 170 } 171 172 ipcbm->alloc = *alloc; 155 173 } 156 174
Note:
See TracChangeset
for help on using the changeset viewer.