GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_canvas_drawing_complete.c Lines: 8 8 100.0 %
Date: 2026-03-06 19:21:09 Branches: 12 12 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
/**   Canvas Management (Canvas)                                          */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_canvas.h"
29
30
31
/* Bring in externs for caller checking code.  */
32
GX_CALLER_CHECKING_EXTERNS
33
34
35
/**************************************************************************/
36
/*                                                                        */
37
/*  FUNCTION                                               RELEASE        */
38
/*                                                                        */
39
/*    _gxe_canvas_drawing_complete                        PORTABLE C      */
40
/*                                                           6.1          */
41
/*  AUTHOR                                                                */
42
/*                                                                        */
43
/*    Kenneth Maxwell, Microsoft Corporation                              */
44
/*                                                                        */
45
/*  DESCRIPTION                                                           */
46
/*                                                                        */
47
/*    This function checks for errors in the canvas drawing complete      */
48
/*    function call.                                                      */
49
/*                                                                        */
50
/*  INPUT                                                                 */
51
/*                                                                        */
52
/*    canvas                                Canvas control block          */
53
/*    flush                                 If GX_TRUE, the content of    */
54
/*                                            the canvas is flushed to    */
55
/*                                            the display                 */
56
/*                                                                        */
57
/*  OUTPUT                                                                */
58
/*                                                                        */
59
/*    status                                Completion status             */
60
/*                                                                        */
61
/*  CALLS                                                                 */
62
/*                                                                        */
63
/*    _gx_canvas_drawing_complete           Actual canvas drawing         */
64
/*                                          complete call                 */
65
/*                                                                        */
66
/*  CALLED BY                                                             */
67
/*                                                                        */
68
/*    Application Code                                                    */
69
/*                                                                        */
70
/**************************************************************************/
71
35
UINT  _gxe_canvas_drawing_complete(GX_CANVAS *canvas, GX_BOOL flush)
72
{
73
UINT status;
74
75
    /* Check for appropriate caller.  */
76

35
    GX_INIT_AND_THREADS_CALLER_CHECKING
77
78
    /* Checks for the invalid input pointers.  */
79
33
    if ((canvas == GX_NULL) ||
80
32
        (canvas -> gx_canvas_display == GX_NULL) ||
81
31
        (canvas -> gx_canvas_memory == GX_NULL))
82
    {
83
3
        return(GX_PTR_ERROR);
84
    }
85
86
    /* Call the actual canvas drawing complete function.  */
87
30
    status = _gx_canvas_drawing_complete(canvas, flush);
88
89
    /* Return completion status.  */
90
30
    return status;
91
}
92