• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Mar-2025-

figures/H17-Mar-2025-

frameworks/H17-Mar-2025-5,3594,169

interfaces/H17-Mar-2025-14,7127,743

test/H17-Mar-2025-3,3532,050

.clang-formatH A D17-Mar-20256.6 KiB161160

BUILD.gnH A D17-Mar-20254.9 KiB159144

LICENSEH A D17-Mar-20259.9 KiB177150

OAT.xmlH A D17-Mar-20253.9 KiB6611

README.mdH A D17-Mar-20255 KiB11781

README_zh.mdH A D17-Mar-20254.4 KiB11781

bundle.jsonH A D17-Mar-2025884 3736

utils.gniH A D17-Mar-20252.9 KiB5549

README.md

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![](figures/dependency-between-modules-of-the-graphics-subsystem.png "dependency-between-modules-of-the-graphics-subsystem")
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![](figures/dependency-between-modules-of-the-graphics-subsystem-and-that-between-graphics-modules-and-the-drive.png "dependency-between-modules-of-the-graphics-subsystem-and-that-between-graphics-modules-and-the-drive")
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**

README_zh.md

1# 图形HALS组件<a name="ZH-CN_TOPIC_0000001124625243"></a>
2
3-   [简介](#section11660541593)
4-   [目录](#section161941989596)
5-   [编译构建](#section137768191623)
6-   [说明](#section1312121216216)
7    -   [使用说明](#section129654513264)
8
9-   [相关仓](#section1371113476307)
10
11## 简介<a name="section11660541593"></a>
12
13HALS组件中实现了对驱动子系统和平台相关功能的适配封装,包括了FrameBuffer/GFX/SIMD等。
14
15**图 1**  图形子系统组件间以及与驱动子系统的依赖关系<a name="fig717664212591"></a>
16![](figures/图形子系统组件间以及与驱动子系统的依赖关系.png "图形子系统组件间以及与驱动子系统的依赖关系")
17
18## 目录<a name="section161941989596"></a>
19
20```
21/foundation/graphic/graphic_utils_lite
22├── frameworks               # 框架代码
23│   ├── diagram              # 2d图形引擎
24│   │   ├── depiction        # 光滑曲线点生成算法
25│   │   ├── rasterizer       # 光栅化处理
26│   │   ├── vertexgenerate   # 顶点生成器
27│   │   └── vertexprimitive  # 顶点几何图元
28│   └── hals                 # 硬件适配层
29├── interfaces               # 接口
30│   ├── innerkits            # 模块间接口
31│   │   └── hals             # 硬件适配层接口
32│   └── kits                 # 对外接口
33│       └── gfx_utils
34└── test                     # 单元测试
35```
36
37## 编译构建<a name="section137768191623"></a>
38
39```
40# 通过gn编译,在out目录下对应产品的文件夹中生成libgraphic_hals.so
41hb build graphic_utils_lite
42```
43
44## 说明<a name="section1312121216216"></a>
45
46### 使用说明<a name="section129654513264"></a>
47
48-   图形UI/SURFACE/WMS组件均使用了HALS组件,可参考相关源码;
49
50## 相关仓<a name="section1371113476307"></a>
51
52[图形子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%9B%BE%E5%BD%A2%E5%AD%90%E7%B3%BB%E7%BB%9F.md)
53
54[window_window_manager_lite](https://gitee.com/openharmony/window_window_manager_lite/blob/master/README.md)
55
56[graphic_surface_lite](https://gitee.com/openharmony/graphic_surface_lite/blob/master/README.md)
57
58[arkui_ui_lite](https://gitee.com/openharmony/arkui_ui_lite/blob/master/README.md)
59
60# 图形UTILS组件<a name="ZH-CN_TOPIC_0000001123083525"></a>
61
62-   [简介](#section11660541593)
63-   [目录](#section161941989596)
64-   [编译构建](#section137768191623)
65-   [说明](#section1312121216216)
66    -   [使用说明](#section129654513264)
67
68-   [相关仓](#section1371113476307)
69
70## 简介<a name="section11660541593"></a>
71
72UTILS组件中定义了图形子系统中的公共数据结构,并提供了一层轻薄的操作系统适配层(如锁、线程、文件系统)。
73
74**图 1**  图形子系统组件间依赖关系<a name="fig717664212591"></a>
75![](figures/图形子系统组件间依赖关系.png "图形子系统组件间依赖关系")
76
77## 目录<a name="section161941989596"></a>
78
79```
80/foundation/graphic/graphic_utils_lite
81├── frameworks      # 框架代码
82│   ├── hals        # 硬件适配层
83│   ├── linux       # linux平台适配层
84│   ├── liteos      # liteos平台适配层
85│   └── windows     # windows平台适配层
86├── interfaces      # 接口
87│   ├── innerkits   # 模块间接口
88│   │   └── hals    # 硬件适配层接口
89│   └── kits        # 对外接口
90└── test            # 单元测试
91```
92
93## 编译构建<a name="section137768191623"></a>
94
95```
96# 通过gn编译,在out目录下对应产品的文件夹中生成libgraphic_utils.so
97hb build graphic_utils_lite
98```
99
100## 说明<a name="section1312121216216"></a>
101
102### 使用说明<a name="section129654513264"></a>
103
104-   图形UI/SURFACE/WMS组件均使用了UTILS组件,可参考相关源码;
105-   test提供了UTILS组件各接口的单元测试,也可参考使用。
106
107## 相关仓<a name="section1371113476307"></a>
108
109[图形子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E5%9B%BE%E5%BD%A2%E5%AD%90%E7%B3%BB%E7%BB%9F.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**