Changeset 7470d97 in mainline for uspace/lib/gfxfont


Ignore:
Timestamp:
2021-04-30T15:05:06Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
051349b
Parents:
252d03c
Message:

Add GC operation to set clipping rectangle

The number of changed files is due to the proliferation of GC
implementations, mostly these are just dummies in unit tests.
Definitely need to tame those in the future.

Location:
uspace/lib/gfxfont/test
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfxfont/test/font.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3939PCUT_TEST_SUITE(font);
    4040
     41static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4142static errno_t testgc_set_color(void *, gfx_color_t *);
    4243static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    4849
    4950static gfx_context_ops_t test_ops = {
     51        .set_clip_rect = testgc_set_clip_rect,
    5052        .set_color = testgc_set_color,
    5153        .fill_rect = testgc_fill_rect,
     
    568570                }
    569571        }
     572}
     573
     574static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     575{
     576        return EOK;
    570577}
    571578
  • uspace/lib/gfxfont/test/glyph.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4343PCUT_TEST_SUITE(glyph);
    4444
     45static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4546static errno_t testgc_set_color(void *, gfx_color_t *);
    4647static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    5253
    5354static gfx_context_ops_t test_ops = {
     55        .set_clip_rect = testgc_set_clip_rect,
    5456        .set_color = testgc_set_color,
    5557        .fill_rect = testgc_fill_rect,
     
    567569        rc = gfx_context_delete(gc);
    568570        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     571}
     572
     573static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     574{
     575        return EOK;
    569576}
    570577
  • uspace/lib/gfxfont/test/glyph_bmp.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3939PCUT_TEST_SUITE(glyph_bmp);
    4040
     41static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4142static errno_t testgc_set_color(void *, gfx_color_t *);
    4243static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    4849
    4950static gfx_context_ops_t test_ops = {
     51        .set_clip_rect = testgc_set_clip_rect,
    5052        .set_color = testgc_set_color,
    5153        .fill_rect = testgc_fill_rect,
     
    581583        rc = gfx_context_delete(gc);
    582584        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     585}
     586
     587static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     588{
     589        return EOK;
    583590}
    584591
  • uspace/lib/gfxfont/test/text.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4040PCUT_TEST_SUITE(text);
    4141
     42static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4243static errno_t testgc_set_color(void *, gfx_color_t *);
    4344static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    4950
    5051static gfx_context_ops_t test_ops = {
     52        .set_clip_rect = testgc_set_clip_rect,
    5153        .set_color = testgc_set_color,
    5254        .fill_rect = testgc_fill_rect,
     
    145147        rc = gfx_context_delete(gc);
    146148        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     149}
     150
     151static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     152{
     153        return EOK;
    147154}
    148155
  • uspace/lib/gfxfont/test/tpf.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4141PCUT_TEST_SUITE(tpf);
    4242
     43static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    4344static errno_t testgc_set_color(void *, gfx_color_t *);
    4445static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    5051
    5152static gfx_context_ops_t test_ops = {
     53        .set_clip_rect = testgc_set_clip_rect,
    5254        .set_color = testgc_set_color,
    5355        .fill_rect = testgc_fill_rect,
     
    208210}
    209211
     212static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     213{
     214        return EOK;
     215}
     216
    210217static errno_t testgc_set_color(void *arg, gfx_color_t *color)
    211218{
  • uspace/lib/gfxfont/test/typeface.c

    r252d03c r7470d97  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737PCUT_TEST_SUITE(typeface);
    3838
     39static errno_t testgc_set_clip_rect(void *, gfx_rect_t *);
    3940static errno_t testgc_set_color(void *, gfx_color_t *);
    4041static errno_t testgc_fill_rect(void *, gfx_rect_t *);
     
    4647
    4748static gfx_context_ops_t test_ops = {
     49        .set_clip_rect = testgc_set_clip_rect,
    4850        .set_color = testgc_set_color,
    4951        .fill_rect = testgc_fill_rect,
     
    9496{
    9597        // TODO
     98}
     99
     100static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
     101{
     102        return EOK;
    96103}
    97104
Note: See TracChangeset for help on using the changeset viewer.