GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_display_canvas_dirty.c Lines: 12 12 100.0 %
Date: 2026-03-06 19:21:09 Branches: 8 8 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** GUIX Component                                                        */
17
/**                                                                       */
18
/**   Dispaly Management (Dispaly)                                        */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_system.h"
29
#include "gx_utility.h"
30
#include "gx_display.h"
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gx_display_canvas_dirty                            PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function marks all root windows as dirty. This is done when    */
45
/*    the system resources are changed so that we re-draw everything.     */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    display                               Display control block         */
50
/*                                                                        */
51
/*  OUTPUT                                                                */
52
/*                                                                        */
53
/*    None                                                                */
54
/*                                                                        */
55
/*  CALLS                                                                 */
56
/*                                                                        */
57
/*     _gx_system_dirty_mark                Mark the widget dirty         */
58
/*                                                                        */
59
/*  CALLED BY                                                             */
60
/*                                                                        */
61
/*    _gx_display_color_set                                               */
62
/*    _gx_display_color_table_set                                         */
63
/*    _gx_display_font_table_set                                          */
64
/*    _gx_display_pixelmap_table_set                                      */
65
/*                                                                        */
66
/**************************************************************************/
67
2387
VOID _gx_display_canvas_dirty(GX_DISPLAY *display)
68
{
69
GX_WIDGET      *win;
70
2387
GX_WINDOW_ROOT *root = _gx_system_root_window_created_list;
71
72
2661
    while (root)
73
    {
74
274
        if (root -> gx_widget_status & GX_STATUS_VISIBLE &&
75
186
            root -> gx_window_root_canvas -> gx_canvas_display == display)
76
        {
77
184
            _gx_system_dirty_mark((GX_WIDGET *)root);
78
184
            win = root -> gx_widget_first_child;
79
80
381
            while (win)
81
            {
82
197
                _gx_system_dirty_mark(win);
83
197
                win = win -> gx_widget_next;
84
            }
85
        }
86
274
        root = (GX_WINDOW_ROOT *)root -> gx_widget_next;
87
    }
88
2387
}
89