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 /**   Application Interface (API)                                         */
18 /**                                                                       */
19 /**************************************************************************/
20 #include "gx_api.h"
21 #include "gx_system.h"
22 #include "gx_display.h"
23 #include "stdio.h"
24 
25 VOID _gx_validation_display_buffer_24xrgb_toggle(GX_CANVAS *canvas, GX_RECTANGLE *dirty);
26 UINT gx_validation_display_driver_setup_24xrgb(GX_DISPLAY *display);
27 VOID gx_validation_graphics_driver_cleanup_24xrgb(GX_DISPLAY *display);
28 UINT gx_validation_display_driver_setup_32argb(GX_DISPLAY *display);
29 
30 #define _gx_validation_display_buffer_32argb_toggle _gx_validation_display_buffer_24xrgb_toggle
31 
_gx_validation_display_buffer_24xrgb_toggle(GX_CANVAS * canvas,GX_RECTANGLE * dirty)32 VOID _gx_validation_display_buffer_24xrgb_toggle(GX_CANVAS *canvas, GX_RECTANGLE *dirty)
33 {
34     GX_PARAMETER_NOT_USED(canvas);
35     GX_PARAMETER_NOT_USED(dirty);
36 }
37 
38 
39 
gx_validation_display_driver_setup_24xrgb(GX_DISPLAY * display)40 UINT gx_validation_display_driver_setup_24xrgb(GX_DISPLAY *display)
41 {
42 
43     /* Initialize the low-level drawing function pointers
44 
45        for windows, these are always just the generic funcions,
46        but for some hardware, these will be customized,
47        optimized functions specific to that hardware
48      */
49 
50 
51     _gx_display_driver_24xrgb_setup(display, (VOID *)1, _gx_validation_display_buffer_24xrgb_toggle);
52 
53 
54     return(GX_SUCCESS);
55 }
56 
gx_validation_display_driver_setup_24xrgb_rotated(GX_DISPLAY * display)57 UINT gx_validation_display_driver_setup_24xrgb_rotated(GX_DISPLAY *display)
58 {
59 
60     /* Initialize the low-level drawing function pointers
61 
62        for windows, these are always just the generic funcions,
63        but for some hardware, these will be customized,
64        optimized functions specific to that hardware
65      */
66 
67 
68     _gx_display_driver_24xrgb_rotated_setup(display, (VOID *)1, _gx_validation_display_buffer_24xrgb_toggle);
69 
70 
71     return(GX_SUCCESS);
72 }
73 
gx_validation_graphics_driver_cleanup_24xrgb(GX_DISPLAY * display)74 VOID gx_validation_graphics_driver_cleanup_24xrgb(GX_DISPLAY *display)
75 {
76 
77     /* Do nothing */
78     GX_PARAMETER_NOT_USED(display);
79 }
80 
gx_validation_display_driver_setup_32argb(GX_DISPLAY * display)81 UINT gx_validation_display_driver_setup_32argb(GX_DISPLAY *display)
82 {
83 
84     /* Initialize the low-level drawing function pointers
85 
86        for windows, these are always just the generic funcions,
87        but for some hardware, these will be customized,
88        optimized functions specific to that hardware
89      */
90 
91 
92     _gx_display_driver_32argb_setup(display, (VOID *)1, _gx_validation_display_buffer_32argb_toggle);
93 
94 
95     return(GX_SUCCESS);
96 }
97 
gx_validation_display_driver_setup_32argb_rotated(GX_DISPLAY * display)98 UINT gx_validation_display_driver_setup_32argb_rotated(GX_DISPLAY *display)
99 {
100 
101     /* Initialize the low-level drawing function pointers
102 
103        for windows, these are always just the generic funcions,
104        but for some hardware, these will be customized,
105        optimized functions specific to that hardware
106      */
107 
108 
109     _gx_display_driver_32argb_rotated_setup(display, (VOID *)1, _gx_validation_display_buffer_32argb_toggle);
110 
111 
112     return(GX_SUCCESS);
113 }
114