GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_binres_pixelmap_load.c Lines: 4 4 100.0 %
Date: 2024-12-05 08:52:37 Branches: 4 4 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 *
4
 * This program and the accompanying materials are made available under the
5
 * terms of the MIT License which is available at
6
 * https://opensource.org/licenses/MIT.
7
 *
8
 * SPDX-License-Identifier: MIT
9
 **************************************************************************/
10
11
12
/**************************************************************************/
13
/**************************************************************************/
14
/**                                                                       */
15
/** GUIX Component                                                        */
16
/**                                                                       */
17
/**   Binres Loader Management (Binres Loader)                            */
18
/**                                                                       */
19
/**************************************************************************/
20
21
#define GX_SOURCE_CODE
22
23
24
/* Include necessary system files.  */
25
26
#include "gx_api.h"
27
#include "gx_binres_loader.h"
28
#include "gx_system.h"
29
30
31
/**************************************************************************/
32
/*                                                                        */
33
/*  FUNCTION                                               RELEASE        */
34
/*                                                                        */
35
/*    _gxe_binres_pixelmap_load                           PORTABLE C      */
36
/*                                                           6.3.0        */
37
/*  AUTHOR                                                                */
38
/*                                                                        */
39
/*    Ting Zhu, Microsoft Corporation                                     */
40
/*                                                                        */
41
/*  DESCRIPTION                                                           */
42
/*                                                                        */
43
/*    This function checks for errors in binres pixelmap load function.   */
44
/*                                                                        */
45
/*  INPUT                                                                 */
46
/*                                                                        */
47
/*    root_address                          Pointer to the binary data    */
48
/*                                            memory                      */
49
/*    map_index                             Resource index of the pixelmap*/
50
/*                                            to be loaded                */
51
/*    pixelmap                              Pointer to the returned       */
52
/*                                            pixelmap                    */
53
/*                                                                        */
54
/*  OUTPUT                                                                */
55
/*                                                                        */
56
/*    status                                Completion status             */
57
/*                                                                        */
58
/*  CALLS                                                                 */
59
/*                                                                        */
60
/*    _gx_binres_pixelmap_load              The actual binres pixelmap    */
61
/*                                            load function               */
62
/*                                                                        */
63
/*  CALLED BY                                                             */
64
/*                                                                        */
65
/*    Application Code                                                    */
66
/*                                                                        */
67
/*  RELEASE HISTORY                                                       */
68
/*                                                                        */
69
/*    DATE              NAME                      DESCRIPTION             */
70
/*                                                                        */
71
/*  10-31-2023     Ting Zhu                 Initial Version 6.3.0         */
72
/*                                                                        */
73
/**************************************************************************/
74
20
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap)
75
{
76

20
    if (root_address == GX_NULL || pixelmap == GX_NULL)
77
    {
78
2
        return GX_PTR_ERROR;
79
    }
80
81
18
    return _gx_binres_pixelmap_load(root_address, map_index, pixelmap);
82
}
83