Skip to content

Commit 354445b

Browse files
author
Bo Chen
committed
Update on 23 Oct 2023. Expand to see details.
8c96f6775 Update release version and date for 6.3.0 minor release. dc8ff31a6 Added partial canvas buffer support for 565rgb color format. 09becae29 Fixed a pattern line draw bug. 8c1e619c2 Remove font page count limitation for standalone binary resource. 34a028615 Drop-list not correctly drawing child widgets. 180ddf8c9 Added VC++ runtime dependency. 57181a765 Fixed GUIX Studio command line to support the opening of a GXP project by specifying the project's pathname. 33c984599 Fixed GUIX Studio test failures. 079b75e09 Improved some error checkings. f166c7633 Improved the performance of the Helium version 24xrgb JPEG decoding. 8ba85ed38 Support standalone binary resource generation and loading. f0b95a87a Re-generate the FreeType library with the Z_PREFIX configuration. ab7e1299a Bump GUIX Studio version to 6.2.1.4. f0a659115 Improved logic to mitigate test failure caused by low-performance test machine. e8100dc1c Fixed crash when delete a color or pixelmap folder with page heap enabled. 9fb6d5d94 Fixed MSRC 81023 bug caused by glyph width casting overflow. ff1ad8aff Fixed potential crash issue with the expand/collapse animation in the accordion menu. 93483ff72 Specify package pipeline triggers to avoid being triggered on everything. 6eea10524 Add pipeline to run codeql. b9c83924e Updated GUIX Studio version and readme for 6.2.1.3 release. b7443814c Enable codeql in onebranch pipeline 5442979ba Bump GUIX Studio version number to 6.2.1.3.
1 parent 50ead25 commit 354445b

File tree

113 files changed

+9136
-614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+9136
-614
lines changed

common/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ target_sources(${PROJECT_NAME}
2424
${CMAKE_CURRENT_LIST_DIR}/src/gx_binres_language_info_load.c
2525
${CMAKE_CURRENT_LIST_DIR}/src/gx_binres_language_table_load.c
2626
${CMAKE_CURRENT_LIST_DIR}/src/gx_binres_theme_load.c
27+
${CMAKE_CURRENT_LIST_DIR}/src/gx_binres_pixelmap_load.c
28+
${CMAKE_CURRENT_LIST_DIR}/src/gx_binres_font_load.c
2729
${CMAKE_CURRENT_LIST_DIR}/src/gx_brush_default.c
2830
${CMAKE_CURRENT_LIST_DIR}/src/gx_brush_define.c
2931
${CMAKE_CURRENT_LIST_DIR}/src/gx_button_background_draw.c
@@ -913,6 +915,8 @@ target_sources(${PROJECT_NAME}
913915
${CMAKE_CURRENT_LIST_DIR}/src/gxe_binres_language_info_load.c
914916
${CMAKE_CURRENT_LIST_DIR}/src/gxe_binres_language_table_load.c
915917
${CMAKE_CURRENT_LIST_DIR}/src/gxe_binres_theme_load.c
918+
${CMAKE_CURRENT_LIST_DIR}/src/gxe_binres_pixelmap_load.c
919+
${CMAKE_CURRENT_LIST_DIR}/src/gxe_binres_font_load.c
916920
${CMAKE_CURRENT_LIST_DIR}/src/gxe_brush_default.c
917921
${CMAKE_CURRENT_LIST_DIR}/src/gxe_brush_define.c
918922
${CMAKE_CURRENT_LIST_DIR}/src/gxe_button_create.c

common/inc/gx_api.h

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* APPLICATION INTERFACE DEFINITION RELEASE */
2525
/* */
2626
/* gx_api.h PORTABLE C */
27-
/* 6.2.1 */
27+
/* 6.3.0 */
2828
/* AUTHOR */
2929
/* */
3030
/* Kenneth Maxwell, Microsoft Corporation */
@@ -68,7 +68,7 @@
6868
/* added new widget type */
6969
/* GX_GENERIC_SCROLL_WHEEL, */
7070
/* added animation delete API, */
71-
/* added generic Dave2D */
71+
/* added generic Dave2D */
7272
/* graphics accelerator */
7373
/* support, */
7474
/* resulting in version 6.1.7 */
@@ -104,6 +104,14 @@
104104
/* 03-08-2023 Ting Zhu Modified comment(s), */
105105
/* updated patch version, */
106106
/* resulting in version 6.2.1 */
107+
/* 10-31-2023 Ting Zhu Modified comment(s), */
108+
/* added new APIs for loading */
109+
/* pixelmap and font from */
110+
/* standalone binary, */
111+
/* removed unused defines, */
112+
/* added partial canvas buffer */
113+
/* support, */
114+
/* resulting in version 6.3.0 */
107115
/* */
108116
/**************************************************************************/
109117

@@ -126,8 +134,8 @@ extern "C" {
126134

127135
#define AZURE_RTOS_GUIX
128136
#define GUIX_MAJOR_VERSION 6
129-
#define GUIX_MINOR_VERSION 2
130-
#define GUIX_PATCH_VERSION 1
137+
#define GUIX_MINOR_VERSION 3
138+
#define GUIX_PATCH_VERSION 0
131139

132140
/* The following symbols are defined for backward compatibility reasons.*/
133141
#define __PRODUCT_GUIX__
@@ -363,7 +371,9 @@ typedef struct GX_STRING_STRUCT
363371
#define GX_FALSE 0
364372
#define GX_NULL 0
365373
#define GX_ID_NONE 0
366-
#define GX_MAGIC_NUMBER 0x4758U
374+
#define GX_MAGIC_NUMBER 0x4758U /* GX */
375+
#define GX_RESOURCE_TYPE_BINRES_NORMAL 0x4758U /* GX */
376+
#define GX_RESOURCE_TYPE_BINRES_STANDALONE 0x4753U /* GS */
367377

368378
/* API return values. */
369379

@@ -970,6 +980,7 @@ typedef struct GX_STRING_STRUCT
970980
#define GX_CANVAS_VISIBLE 0x04 /* Canvas is visible */
971981
#define GX_CANVAS_MODIFIED 0x08
972982
#define GX_CANVAS_COMPOSITE 0x20 /* Canvas is a buffer for creating composite*/
983+
#define GX_CANVAS_PARTIAL_FRAME_BUFFER 0x40
973984

974985
/* Define common combinations. */
975986

@@ -1519,6 +1530,10 @@ typedef struct GX_DRAW_CONTEXT_STRUCT
15191530
GX_RECTANGLE gx_draw_context_dirty;
15201531
GX_RECTANGLE *gx_draw_context_clip;
15211532
GX_VALUE gx_draw_context_pitch;
1533+
#if defined GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER
1534+
GX_VALUE gx_draw_context_offset_x;
1535+
GX_VALUE gx_draw_context_offset_y;
1536+
#endif
15221537
} GX_DRAW_CONTEXT;
15231538

15241539
/* Define fill map info type. */
@@ -1808,6 +1823,12 @@ typedef struct GX_CANVAS_STRUCT
18081823

18091824
/* Define the canvas memory pointer. */
18101825
GX_COLOR *gx_canvas_memory;
1826+
#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER
1827+
GX_VALUE gx_canvas_memory_width;
1828+
GX_VALUE gx_canvas_memory_height;
1829+
GX_VALUE gx_canvas_memory_offset_x;
1830+
GX_VALUE gx_canvas_memory_offset_y;
1831+
#endif
18111832

18121833
/* padded canvas memory buffer, only needed for Win32 */
18131834
#ifdef GX_TARGET_WIN32
@@ -1835,7 +1856,6 @@ typedef struct GX_CANVAS_STRUCT
18351856
GX_UBYTE gx_canvas_alpha;
18361857
GX_UBYTE gx_canvas_draw_nesting;
18371858
GX_BYTE gx_canvas_hardware_layer;
1838-
18391859
} GX_CANVAS;
18401860

18411861
/* Define Theme type */
@@ -1877,7 +1897,6 @@ typedef struct GX_PEN_CONFIGURATION_STRUCT
18771897
UINT gx_pen_configuration_max_pen_speed_ticks;
18781898
} GX_PEN_CONFIGURATION;
18791899

1880-
18811900
#define GX_RESOURCE_HEADER_SIZE 20
18821901
#define GX_THEME_HEADER_SIZE 114
18831902
#define GX_COLOR_HEADER_SIZE 8
@@ -3002,6 +3021,8 @@ typedef struct GX_FIXED_POINT_STRUCT
30023021
#endif
30033022
#define gx_binres_language_table_load_ext _gx_binres_language_table_load_ext
30043023
#define gx_binres_theme_load _gx_binres_theme_load
3024+
#define gx_binres_pixelmap_load _gx_binres_pixelmap_load
3025+
#define gx_binres_font_load _gx_binres_font_load
30053026

30063027
#define gx_brush_default _gx_brush_default
30073028
#define gx_brush_define _gx_brush_define
@@ -3488,8 +3509,6 @@ typedef struct GX_FIXED_POINT_STRUCT
34883509
#define gx_text_scroll_wheel_draw _gx_text_scroll_wheel_draw
34893510
#define gx_text_scroll_wheel_event_process _gx_text_scroll_wheel_event_process
34903511

3491-
#define gx_transition_window_create(a, b, c, d, e, f) _gx_transition_window_create(a, b, (GX_WIDGET *)c, d, e, f)
3492-
34933512
#define gx_tree_view_create(a, b, c, d, e, f) _gx_tree_view_create((GX_TREE_VIEW *)a, b, (GX_WIDGET *)c, d, e, f)
34943513
#define gx_tree_view_draw _gx_tree_view_draw
34953514
#define gx_tree_view_event_process _gx_tree_view_event_process
@@ -3662,6 +3681,8 @@ UINT _gx_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returne
36623681
#endif
36633682
UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
36643683
UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
3684+
UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
3685+
UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
36653686

36663687
UINT _gx_brush_default(GX_BRUSH *brush);
36673688
UINT _gx_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);
@@ -4484,6 +4505,8 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
44844505
#endif
44854506
#define gx_binres_language_table_load_ext _gxe_binres_language_table_load_ext
44864507
#define gx_binres_theme_load _gxe_binres_theme_load
4508+
#define gx_binres_pixelmap_load _gxe_binres_pixelmap_load
4509+
#define gx_binres_font_load _gxe_binres_font_load
44874510

44884511
#define gx_brush_default _gxe_brush_default
44894512
#define gx_brush_define _gxe_brush_define
@@ -5139,6 +5162,8 @@ UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****return
51395162
#endif
51405163
UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
51415164
UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
5165+
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
5166+
UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
51425167

51435168
UINT _gxe_brush_default(GX_BRUSH *brush);
51445169
UINT _gxe_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);

common/inc/gx_binres_loader.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* COMPONENT DEFINITION RELEASE */
2727
/* */
2828
/* gx_binres_loader.h PORTABLE C */
29-
/* 6.1 */
29+
/* 6.3.0 */
3030
/* AUTHOR */
3131
/* */
3232
/* Kenneth Maxwell, Microsoft Corporation */
@@ -46,6 +46,9 @@
4646
/* defined macros to read */
4747
/* integer value, */
4848
/* resulting in version 6.1 */
49+
/* 10-31-2023 Ting Zhu Modified comment(s), */
50+
/* declared new prototypes, */
51+
/* resulting in version 6.3.0 */
4952
/* */
5053
/**************************************************************************/
5154

@@ -84,6 +87,13 @@ UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEAD
8487

8588
UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *header);
8689
UINT _gx_binres_language_header_load(GX_BINRES_DATA_INFO *info, GX_LANGUAGE_HEADER *header);
90+
UINT _gx_binres_one_pixelmap_load(GX_BINRES_DATA_INFO *info, GX_PIXELMAP **returned_pixelmap, USHORT *map_id);
91+
UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
92+
UINT _gx_binres_font_buffer_size_get(GX_BINRES_DATA_INFO *info, UINT *buffer_size, GX_BOOL reset_read_offset);
93+
UINT _gx_binres_one_font_load(GX_BINRES_DATA_INFO *info, GX_FONT **return_font);
94+
UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *header);
95+
UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
96+
UINT _gx_binres_standalone_resource_seek(GX_BINRES_DATA_INFO *info, UINT res_index);
8797

8898
/* Define error checking shells for API services. These are only referenced by the
8999
application. */
@@ -95,6 +105,8 @@ UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****return
95105
#endif
96106
UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
97107
UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
108+
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
109+
UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT res_index, GX_UBYTE *buffer, ULONG *buffer_size);
98110

99111
#endif
100112

common/inc/gx_display.h

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* COMPONENT DEFINITION RELEASE */
2727
/* */
2828
/* gx_display.h PORTABLE C */
29-
/* 6.x */
29+
/* 6.3.0 */
3030
/* AUTHOR */
3131
/* */
3232
/* Kenneth Maxwell, Microsoft Corporation */
@@ -60,9 +60,11 @@
6060
/* added language direction */
6161
/* table set declarations, */
6262
/* resulting in version 6.1.10 */
63-
/* xx-xx-xxxx Ting Zhu Modified comment(s), */
63+
/* 10-31-2023 Ting Zhu Modified comment(s), */
6464
/* removed unused prototypes, */
65-
/* resulting in version 6.x */
65+
/* added partial canvas buffer */
66+
/* support, */
67+
/* resulting in version 6.3.0 */
6668
/* */
6769
/**************************************************************************/
6870

@@ -542,3 +544,13 @@ VOID *_win32_canvas_memory_prepare(GX_CANVAS *canvas, GX_RECTANGLE *dirty);
542544
}
543545
#endif
544546

547+
#if defined GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER
548+
#define GX_CALCULATE_PUTROW(putrow, xpos, ypos, context)\
549+
putrow += (ypos - context->gx_draw_context_offset_y) * context->gx_draw_context_pitch;\
550+
putrow += (xpos - context->gx_draw_context_offset_x)
551+
#else
552+
#define GX_CALCULATE_PUTROW(putrow, xpos, ypos, context)\
553+
putrow += ypos * context->gx_draw_context_pitch;\
554+
putrow += xpos
555+
#endif
556+

common/inc/gx_image_reader.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* COMPONENT DEFINITION RELEASE */
2727
/* */
2828
/* gx_image_reader.h PORTABLE C */
29-
/* 6.x */
29+
/* 6.3.0 */
3030
/* AUTHOR */
3131
/* */
3232
/* Kenneth Maxwell, Microsoft Corporation */
@@ -52,9 +52,11 @@
5252
/* added definitions for fixed */
5353
/* size table dimensions, */
5454
/* resulting in version 6.2.0 */
55-
/* xx-xx-xxxx Ting Zhu Modified comment(s), added */
55+
/* 10-31-2023 Ting Zhu Modified comment(s), added */
5656
/* support for ARM Helium, */
57-
/* resulting in version 6.x */
57+
/* added partial canvas buffer */
58+
/* support, */
59+
/* resulting in version 6.3.0 */
5860
/* */
5961
/**************************************************************************/
6062
#if defined(GX_SOFTWARE_DECODER_SUPPORT)
@@ -133,6 +135,10 @@ typedef struct GX_JPEG_INFO_STRUCT
133135
VOID (*gx_jpeg_pixel_write)(struct GX_JPEG_INFO_STRUCT *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue);
134136
#endif
135137
GX_UBYTE *gx_jpeg_output_buffer;
138+
#if defined(GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER)
139+
GX_VALUE gx_jpeg_output_buffer_offset_x;
140+
GX_VALUE gx_jpeg_output_buffer_offset_y;
141+
#endif
136142
USHORT gx_jpeg_output_width;
137143
USHORT gx_jpeg_output_height;
138144
INT gx_jpeg_output_stride;

common/inc/gx_user_sample.h

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* APPLICATION INTERFACE DEFINITION RELEASE */
2525
/* */
2626
/* gx_user.h PORTABLE C */
27-
/* 6.x */
27+
/* 6.3.0 */
2828
/* AUTHOR */
2929
/* */
3030
/* Kenneth Maxwell, Microsoft Corporation */
@@ -45,10 +45,11 @@
4545
/* 01-31-2022 Kenneth Maxwell Modified comment(s), */
4646
/* fixed typo, */
4747
/* resulting in version 6.1.10 */
48-
/* xx-xx-xxxx Ting Zhu Modified comment(s), */
49-
/* added GX_ENABLE_ARM_HELIUM */
50-
/* definition, */
51-
/* resulting in version 6.x */
48+
/* 10-31-2023 Ting Zhu Modified comment(s), added */
49+
/* GX_ENABLE_ARM_HELIUM and */
50+
/* partial canvas frame buffer */
51+
/* support configurations, */
52+
/* resulting in version 6.3.0 */
5253
/* */
5354
/**************************************************************************/
5455

@@ -76,5 +77,18 @@
7677
/* This can be defined to enable the use of ARM Helium intrinsics for
7778
JPEG decoding. */
7879
/* #define GX_ENABLE_ARM_HELIUM */
80+
81+
/* This can be defined to enable the partial canvas frame buffer feature. */
82+
/* #define GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER */
83+
84+
/* The two following definitions can be used to specify the canvas refresh directions for the partial canvas frame buffer feature.
85+
By default, the canvas refreshes its dirty areas one by one.
86+
If the application requires refreshing the canvas in a specific direction to mitigate tearing effects, one of the following two definitions can be used.
87+
In this scenario, the total dirty area that covers all the dirty areas is calculated, and then the canvas is refreshed in the direction
88+
defined by one of the following two definitions. */
89+
90+
/* #define GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL */
91+
/* #define GX_CANVAS_REFRESH_DIRECTION_VERTICAL */
92+
7993
#endif
8094

0 commit comments

Comments
 (0)