Changeset 84e74ea in mainline for uspace/srv/hid/display/display.c


Ignore:
Timestamp:
2020-06-08T18:30:52Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc492d5
Parents:
a65b0c8
Message:

Remove XXX comment from each call to display_get_gc()

These were added with the intent that each piece of code that does rendering
in the display server is augmented with a loop over all display devices.
The better solution seems to be to introduce a virtualization layer in the
form of a cloning GC that clones the rendering operations to each display
device. It makes the business code simpler and separates concerns better.
It could also allow having more types of output GCs, than just display
devices (such as an 'observer' for RFB).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/display.c

    ra65b0c8 r84e74ea  
    585585}
    586586
    587 // XXX
     587/** Get unbuffered GC.
     588 *
     589 * Get the display's (unbuffered) graphic context. If the display
     590 * is double-buffered, this returns GC of the front buffer. If the display
     591 * is unbuffered, this is the same as @c ds_display_get_gc().
     592 *
     593 * @param display Display
     594 * @return Unbuffered GC
     595 */
    588596static gfx_context_t *ds_display_get_unbuf_gc(ds_display_t *display)
    589597{
    590598        ds_ddev_t *ddev;
    591599
     600        /*
     601         * XXX To properly support multiple display devices, create
     602         * a cloning GC that copies rendering operation to each output.
     603         */
    592604        ddev = ds_display_first_ddev(display);
    593605        if (ddev == NULL)
     
    597609}
    598610
    599 // XXX
     611/** Get display GC.
     612 *
     613 * Get the graphic context used to paint the display. This is to be used
     614 * for all display server paint operations.
     615 *
     616 * @param display Display
     617 * @return Graphic context for painting to the display
     618 */
    600619gfx_context_t *ds_display_get_gc(ds_display_t *display)
    601620{
     
    622641                crect = disp->rect;
    623642
    624         gc = ds_display_get_gc(disp); // XXX
     643        gc = ds_display_get_gc(disp);
    625644        if (gc == NULL)
    626645                return EOK;
Note: See TracChangeset for help on using the changeset viewer.