1# Utils<a name="EN-US_TOPIC_0000001123083525"></a> 2 3- [Introduction](#section11660541593) 4- [Directory Structure](#section161941989596) 5- [Compilation and Building](#section137768191623) 6- [Description](#section1312121216216) 7 - [Usage](#section129654513264) 8 9- [Repositories Involved](#section1371113476307) 10 11## Introduction<a name="section11660541593"></a> 12 13The Utils module defines the common data structure in the graphics subsystem and provides a lite OS adaptation layer, which includes the lock, thread, and file system. 14 15**Figure 1** Dependency between modules of the graphics subsystem<a name="fig717664212591"></a> 16 17 18## Directory Structure<a name="section161941989596"></a> 19 20``` 21/foundation/graphic/graphic_utils_lite 22├── frameworks # Framework code 23│ ├── diagram # 2d graphic engine implementation 24│ │ ├── depiction # Smooth curve point generation algorithm 25│ │ ├── rasterizer # rasterizer handling 26│ │ ├── vertexgenerate # vertex generation 27│ │ └── vertexprimitive # vertex primitive generation 28│ └── hals # Hardware adaptation layer 29├── interfaces # APIs 30│ ├── innerkits # APIs between modules 31│ │ └── hals # APIs of the hardware adaptation layer 32│ └── kits # External APIs 33│ └── gfx_utils 34└── test # Unit testing 35``` 36 37## Compilation and Building<a name="section137768191623"></a> 38 39``` 40# Generate the libgraphic_utils.so file in the out directory of the product folder through GN compilation. 41hb build graphic_utils_lite 42``` 43 44## Description<a name="section1312121216216"></a> 45 46### Usage<a name="section129654513264"></a> 47 48- Utils is used in UI, surface, and WMS modules. For details, see the related source code. 49- The **test** folder provides unit testing for each utils API. Refer to it for the usage of utils. 50 51## Repositories Involved<a name="section1371113476307"></a> 52 53[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics.md) 54 55[window_window_manager_lite](https://gitee.com/openharmony/window_window_manager_lite/blob/master/README.md) 56 57[graphic_surface_lite](https://gitee.com/openharmony/graphic_surface_lite/blob/master/README.md) 58 59[arkui_ui_lite](https://gitee.com/openharmony/arkui_ui_lite/blob/master/README.md) 60 61# Hals<a name="EN-US_TOPIC_0000001124625243"></a> 62 63- [Introduction](#section11660541593) 64- [Directory Structure](#section161941989596) 65- [Compilation and Building](#section137768191623) 66- [Description](#section1312121216216) 67 - [Usage](#section129654513264) 68 69- [Repositories Involved](#section1371113476307) 70 71## Introduction<a name="section11660541593"></a> 72 73The Hals module adapts and encapsulates the functions related to the driver subsystem and platform, including FrameBuffer, graphics \(GFX\), and single instruction, multiple data \(SIMD\). 74 75**Figure 1** Dependency between modules of the graphics subsystem and that between graphics modules and the driver subsystem<a name="fig717664212591"></a> 76 77 78## Directory Structure<a name="section161941989596"></a> 79 80``` 81/foundation/graphic/graphic_utils_lite 82├── frameworks # Framework code 83│ ├── hals # Hardware adaptation layer 84│ ├── linux # Linux platform adaptation layer 85│ ├── liteos # LiteOS platform adaptation layer 86│ └── windows # Windows platform adaptation layer 87├── interfaces # APIs 88│ ├── innerkits # APIs between modules 89│ │ └── hals # APIs of the hardware adaptation layer 90│ └── kits # External APIs 91└── test # Unit testing 92``` 93 94## Compilation and Building<a name="section137768191623"></a> 95 96``` 97# Generate the libgraphic_hals.so file in the out directory of the product folder through GN compilation. 98hb build graphic_utils_lite 99``` 100 101## Description<a name="section1312121216216"></a> 102 103### Usage<a name="section129654513264"></a> 104 105- Hals is used in UI, surface, and WMS modules. For details, see the related source code. 106 107## Repositories Involved<a name="section1371113476307"></a> 108 109[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics.md) 110 111[window_window_manager_lite](https://gitee.com/openharmony/window_window_manager_lite/blob/master/README.md) 112 113[graphic_surface_lite](https://gitee.com/openharmony/graphic_surface_lite/blob/master/README.md) 114 115[arkui_ui_lite](https://gitee.com/openharmony/arkui_ui_lite/blob/master/README.md) 116 117**graphic_graphic_utils_lite**