Lines Matching full:desc
100 const struct display_buffer_descriptor *desc, const void *buf) in sdl_display_write_argb8888() argument
102 __ASSERT((desc->pitch * 4U * desc->height) <= desc->buf_size, in sdl_display_write_argb8888()
105 memcpy(disp_buf, buf, desc->pitch * 4U * desc->height); in sdl_display_write_argb8888()
109 const struct display_buffer_descriptor *desc, const void *buf) in sdl_display_write_rgb888() argument
116 __ASSERT((desc->pitch * 3U * desc->height) <= desc->buf_size, in sdl_display_write_rgb888()
119 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_write_rgb888()
120 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_write_rgb888()
122 ((h_idx * desc->pitch) + w_idx) * 3U; in sdl_display_write_rgb888()
133 const struct display_buffer_descriptor *desc, const void *buf) in sdl_display_write_rgb565() argument
141 __ASSERT((desc->pitch * 2U * desc->height) <= desc->buf_size, in sdl_display_write_rgb565()
144 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_write_rgb565()
145 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_write_rgb565()
147 ((h_idx * desc->pitch) + w_idx); in sdl_display_write_rgb565()
159 const struct display_buffer_descriptor *desc, const void *buf) in sdl_display_write_bgr565() argument
166 __ASSERT((desc->pitch * 2U * desc->height) <= desc->buf_size, in sdl_display_write_bgr565()
169 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_write_bgr565()
170 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_write_bgr565()
172 ((h_idx * desc->pitch) + w_idx); in sdl_display_write_bgr565()
183 const struct display_buffer_descriptor *desc, const void *buf, in sdl_display_write_mono() argument
194 __ASSERT((desc->pitch * desc->height) <= (desc->buf_size * 8U), in sdl_display_write_mono()
196 __ASSERT((desc->height % 8) == 0U, in sdl_display_write_mono()
205 for (tile_idx = 0U; tile_idx < desc->height/8U; ++tile_idx) { in sdl_display_write_mono()
206 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_write_mono()
208 ((tile_idx * desc->pitch) + w_idx); in sdl_display_write_mono()
217 disp_buf += (desc->width * 4U); in sdl_display_write_mono()
222 disp_buf += 7 * (desc->width * 4U); in sdl_display_write_mono()
228 const struct display_buffer_descriptor *desc, in sdl_display_write() argument
234 LOG_DBG("Writing %dx%d (w,h) bitmap @ %dx%d (x,y)", desc->width, in sdl_display_write()
235 desc->height, x, y); in sdl_display_write()
237 __ASSERT(desc->width <= desc->pitch, "Pitch is smaller than width"); in sdl_display_write()
238 __ASSERT(desc->pitch <= config->width, in sdl_display_write()
240 __ASSERT(desc->height <= config->height, in sdl_display_write()
242 __ASSERT(x + desc->width <= config->width, in sdl_display_write()
244 __ASSERT(y + desc->height <= config->height, in sdl_display_write()
247 if (desc->width > desc->pitch || in sdl_display_write()
248 x + desc->width > config->width || in sdl_display_write()
249 y + desc->height > config->height) { in sdl_display_write()
254 sdl_display_write_argb8888(disp_data->buf, desc, buf); in sdl_display_write()
256 sdl_display_write_rgb888(disp_data->buf, desc, buf); in sdl_display_write()
258 sdl_display_write_mono(disp_data->buf, desc, buf, true); in sdl_display_write()
260 sdl_display_write_mono(disp_data->buf, desc, buf, false); in sdl_display_write()
262 sdl_display_write_rgb565(disp_data->buf, desc, buf); in sdl_display_write()
264 sdl_display_write_bgr565(disp_data->buf, desc, buf); in sdl_display_write()
267 sdl_display_write_bottom(desc->height, desc->width, x, y, disp_data->renderer, in sdl_display_write()
270 disp_data->display_on, desc->frame_incomplete); in sdl_display_write()
276 const struct display_buffer_descriptor *desc, void *buf) in sdl_display_read_argb8888() argument
278 __ASSERT((desc->pitch * 4U * desc->height) <= desc->buf_size, "Read buffer is too small"); in sdl_display_read_argb8888()
280 memcpy(buf, read_buf, desc->pitch * 4U * desc->height); in sdl_display_read_argb8888()
284 const struct display_buffer_descriptor *desc, void *buf) in sdl_display_read_rgb888() argument
291 __ASSERT((desc->pitch * 3U * desc->height) <= desc->buf_size, "Read buffer is too small"); in sdl_display_read_rgb888()
293 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_read_rgb888()
294 buf8 = ((uint8_t *)buf) + desc->pitch * 3U * h_idx; in sdl_display_read_rgb888()
296 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_read_rgb888()
297 pix_ptr = (const uint32_t *)read_buf + ((h_idx * desc->pitch) + w_idx); in sdl_display_read_rgb888()
309 const struct display_buffer_descriptor *desc, void *buf) in sdl_display_read_rgb565() argument
317 __ASSERT((desc->pitch * 2U * desc->height) <= desc->buf_size, "Read buffer is too small"); in sdl_display_read_rgb565()
319 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_read_rgb565()
320 buf16 = (void *)(((uint8_t *)buf) + desc->pitch * 2U * h_idx); in sdl_display_read_rgb565()
322 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_read_rgb565()
323 pix_ptr = (const uint32_t *)read_buf + ((h_idx * desc->pitch) + w_idx); in sdl_display_read_rgb565()
334 const struct display_buffer_descriptor *desc, void *buf) in sdl_display_read_bgr565() argument
342 __ASSERT((desc->pitch * 2U * desc->height) <= desc->buf_size, "Read buffer is too small"); in sdl_display_read_bgr565()
344 for (h_idx = 0U; h_idx < desc->height; ++h_idx) { in sdl_display_read_bgr565()
345 buf16 = (void *)(((uint8_t *)buf) + desc->pitch * 2U * h_idx); in sdl_display_read_bgr565()
347 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_read_bgr565()
348 pix_ptr = (const uint32_t *)read_buf + ((h_idx * desc->pitch) + w_idx); in sdl_display_read_bgr565()
359 const struct display_buffer_descriptor *desc, void *buf, in sdl_display_read_mono() argument
369 __ASSERT((desc->pitch * desc->height) <= (desc->buf_size * 8U), "Read buffer is too small"); in sdl_display_read_mono()
370 __ASSERT((desc->height % 8U) == 0U, "Read buffer height not aligned per 8 pixels"); in sdl_display_read_mono()
372 for (tile_idx = 0U; tile_idx < (desc->height / 8U); ++tile_idx) { in sdl_display_read_mono()
373 buf8 = (void *)(((uint8_t *)buf) + desc->pitch * tile_idx); in sdl_display_read_mono()
375 for (w_idx = 0U; w_idx < desc->width; ++w_idx) { in sdl_display_read_mono()
380 ((tile_idx * 8 + h_idx) * desc->pitch + w_idx); in sdl_display_read_mono()
393 const struct display_buffer_descriptor *desc, in sdl_display_read() argument
399 LOG_DBG("Reading %dx%d (w,h) bitmap @ %dx%d (x,y)", desc->width, in sdl_display_read()
400 desc->height, x, y); in sdl_display_read()
402 __ASSERT(desc->width <= desc->pitch, "Pitch is smaller than width"); in sdl_display_read()
404 memset(disp_data->read_buf, 0, desc->pitch * desc->height * 4); in sdl_display_read()
406 err = sdl_display_read_bottom(desc->height, desc->width, x, y, disp_data->renderer, in sdl_display_read()
407 disp_data->read_buf, desc->pitch, disp_data->mutex, in sdl_display_read()
415 sdl_display_read_argb8888(disp_data->read_buf, desc, buf); in sdl_display_read()
417 sdl_display_read_rgb888(disp_data->read_buf, desc, buf); in sdl_display_read()
419 sdl_display_read_mono(disp_data->read_buf, desc, buf, true); in sdl_display_read()
421 sdl_display_read_mono(disp_data->read_buf, desc, buf, false); in sdl_display_read()
423 sdl_display_read_rgb565(disp_data->read_buf, desc, buf); in sdl_display_read()
425 sdl_display_read_bgr565(disp_data->read_buf, desc, buf); in sdl_display_read()