Changeset 5271e4c in mainline
- Timestamp:
- 2020-06-22T12:20:42Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 195b7b3
- Parents:
- 66a408f7
- git-author:
- Jiri Svoboda <jiri@…> (2020-06-21 15:20:18)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-06-22 12:20:42)
- Location:
- uspace
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/bitmap.c
r66a408f7 r5271e4c 77 77 78 78 rc = gc->ops->bitmap_create(gc->arg, params, alloc, &bm_priv); 79 if (rc != EOK) 79 if (rc != EOK) { 80 free(bitmap); 80 81 return rc; 82 } 81 83 82 84 bitmap->gc = gc; -
uspace/lib/memgfx/src/memgc.c
r66a408f7 r5271e4c 70 70 * Set drawing color on memory GC. 71 71 * 72 * @param arg CanvasGC72 * @param arg Memory GC 73 73 * @param color Color 74 74 * … … 87 87 /** Fill rectangle on memory GC. 88 88 * 89 * @param arg CanvasGC89 * @param arg Memory GC 90 90 * @param rect Rectangle 91 91 * … … 166 166 /** Delete memory GC. 167 167 * 168 * @param mgc CanvasGC168 * @param mgc Memory GC 169 169 */ 170 170 errno_t mem_gc_delete(mem_gc_t *mgc) … … 195 195 /** Get generic graphic context from memory GC. 196 196 * 197 * @param mgc CanvasGC197 * @param mgc Memory GC 198 198 * @return Graphic context 199 199 */ … … 210 210 /** Create bitmap in memory GC. 211 211 * 212 * @param arg CanvasGC212 * @param arg Memory GC 213 213 * @param params Bitmap params 214 214 * @param alloc Bitmap allocation info or @c NULL -
uspace/srv/hid/display/ddev.c
r66a408f7 r5271e4c 141 141 } 142 142 143 rc = ds_display_paint _bg(display, NULL);143 rc = ds_display_paint(display, NULL); 144 144 if (rc != EOK) 145 145 return rc; -
uspace/srv/hid/display/display.c
r66a408f7 r5271e4c 42 42 #include <stdlib.h> 43 43 #include "client.h" 44 #include "clonegc.h" 44 45 #include "cursimg.h" 45 46 #include "cursor.h" … … 505 506 disp->rect = ddev->info.rect; 506 507 508 /* Create cloning GC */ 509 rc = ds_clonegc_create(ddev->gc, &disp->fbgc); 510 if (rc != EOK) { 511 // XXX Remove output 512 return ENOMEM; 513 } 514 507 515 /* Allocate backbuffer */ 508 516 rc = ds_display_alloc_backbuf(disp); 517 if (rc != EOK) { 518 // XXX Remove output 519 // XXX Delete clone GC 520 goto error; 521 } 522 } else { 523 /* Add new output device to cloning GC */ 524 rc = ds_clonegc_add_output(disp->fbgc, ddev->gc); 509 525 if (rc != EOK) 510 526 goto error; … … 596 612 static gfx_context_t *ds_display_get_unbuf_gc(ds_display_t *display) 597 613 { 598 ds_ddev_t *ddev; 599 600 /* 601 * XXX To properly support multiple display devices, create 602 * a cloning GC that copies rendering operation to each output. 603 */ 604 ddev = ds_display_first_ddev(display); 605 if (ddev == NULL) 606 return NULL; 607 608 return ddev->gc; 614 /* In case of unit tests */ 615 if (display->fbgc == NULL) 616 return NULL; 617 618 return ds_clonegc_get_ctx(display->fbgc); 609 619 } 610 620 -
uspace/srv/hid/display/meson.build
r66a408f7 r5271e4c 31 31 src = files( 32 32 'client.c', 33 'clonegc.c', 33 34 'cursor.c', 34 35 'cursimg.c', … … 45 46 test_src = files( 46 47 'client.c', 48 'clonegc.c', 47 49 'cursimg.c', 48 50 'cursor.c', … … 52 54 'window.c', 53 55 'test/client.c', 56 'test/clonegc.c', 54 57 'test/cursor.c', 55 58 'test/display.c', -
uspace/srv/hid/display/test/main.c
r66a408f7 r5271e4c 32 32 33 33 PCUT_IMPORT(client); 34 PCUT_IMPORT(clonegc); 34 35 PCUT_IMPORT(cursor); 35 36 PCUT_IMPORT(display); -
uspace/srv/hid/display/types/display/display.h
r66a408f7 r5271e4c 45 45 #include <types/display/cursor.h> 46 46 #include "cursor.h" 47 #include "clonegc.h" 47 48 #include "window.h" 48 49 … … 100 101 mem_gc_t *bbgc; 101 102 103 /** Frontbuffer (clone) GC */ 104 ds_clonegc_t *fbgc; 105 102 106 /** Backbuffer dirty rectangle */ 103 107 gfx_rect_t dirty_rect; -
uspace/srv/hid/rfb/main.c
r66a408f7 r5271e4c 110 110 rfb->damage_rect.y = new_rect.p0.y; 111 111 rfb->damage_rect.width = new_rect.p1.x - new_rect.p0.x; 112 rfb->damage_rect.height = new_rect.p1.y - new_rect.p 1.y;112 rfb->damage_rect.height = new_rect.p1.y - new_rect.p0.y; 113 113 } 114 114
Note:
See TracChangeset
for help on using the changeset viewer.