Changeset 7470d97 in mainline for uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
- Timestamp:
- 2021-04-30T15:05:06Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 051349b
- Parents:
- 252d03c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
r252d03c r7470d97 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * Copyright (c) 2013 Jan Vesely 4 4 * All rights reserved. … … 67 67 static errno_t amdm37x_ddev_get_info(void *, ddev_info_t *); 68 68 69 static errno_t amdm37x_gc_set_clip_rect(void *, gfx_rect_t *); 69 70 static errno_t amdm37x_gc_set_color(void *, gfx_color_t *); 70 71 static errno_t amdm37x_gc_fill_rect(void *, gfx_rect_t *); … … 81 82 82 83 gfx_context_ops_t amdm37x_gc_ops = { 84 .set_clip_rect = amdm37x_gc_set_clip_rect, 83 85 .set_color = amdm37x_gc_set_color, 84 86 .fill_rect = amdm37x_gc_fill_rect, … … 291 293 dispc->rect.p1.x = x; 292 294 dispc->rect.p1.y = y; 295 dispc->clip_rect = dispc->rect; 293 296 dispc->size = size; 294 297 … … 321 324 } 322 325 326 /** Set clipping rectangle on AMDM37x display controller. 327 * 328 * @param arg AMDM37x display controller 329 * @param rect Rectangle 330 * 331 * @return EOK on success or an error code 332 */ 333 static errno_t amdm37x_gc_set_clip_rect(void *arg, gfx_rect_t *rect) 334 { 335 amdm37x_dispc_t *dispc = (amdm37x_dispc_t *) arg; 336 337 if (rect != NULL) 338 gfx_rect_clip(rect, &dispc->rect, &dispc->clip_rect); 339 else 340 dispc->clip_rect = dispc->rect; 341 342 return EOK; 343 } 344 323 345 /** Set color on AMDM37x display controller. 324 346 * … … 354 376 355 377 /* Make sure we have a sorted, clipped rectangle */ 356 gfx_rect_clip(rect, &dispc-> rect, &crect);378 gfx_rect_clip(rect, &dispc->clip_rect, &crect); 357 379 358 380 for (y = crect.p0.y; y < crect.p1.y; y++) { … … 479 501 pbm.data = dcbm->alloc.pixels; 480 502 481 /* Transform AMDM37x bounding rectangle back to bitmap coordinate system */482 gfx_rect_rtranslate(&offs, &dispc-> rect, &skfbrect);503 /* Transform AMDM37x clipping rectangle back to bitmap coordinate system */ 504 gfx_rect_rtranslate(&offs, &dispc->clip_rect, &skfbrect); 483 505 484 506 /*
Note:
See TracChangeset
for help on using the changeset viewer.