• Home
Name Date Size #Lines LOC

..--

figures/12-May-2024-

frameworks/12-May-2024-2,2471,733

interfaces/12-May-2024-6,6553,279

test/12-May-2024-3,3582,064

.clang-formatD12-May-20246.6 KiB161160

BUILD.gnD12-May-20243.4 KiB125110

LICENSED12-May-20249.9 KiB177150

README.mdD12-May-20244.6 KiB11478

README_zh.mdD12-May-20244 KiB11478

bundle.jsonD12-May-2024847 3736

utils.gniD12-May-20241.6 KiB4337

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/utils
22├── frameworks      # Framework code
23│   ├── hals        # Hardware adaptation layer
24│   ├── linux       # Linux platform adaptation layer
25│   ├── liteos      # LiteOS platform adaptation layer
26│   └── windows     # Windows platform adaptation layer
27├── interfaces      # APIs
28│   ├── innerkits   # APIs between modules
29│   │   └── hals    # APIs of the hardware adaptation layer
30│   └── kits        # External APIs
31└── test            # Unit testing
32```
33
34## Compilation and Building<a name="section137768191623"></a>
35
36```
37# Generate the libgraphic_utils.so file in the out directory of the product folder through GN compilation.
38hb build lite_graphic_utils
39```
40
41## Description<a name="section1312121216216"></a>
42
43### Usage<a name="section129654513264"></a>
44
45-   Utils is used in UI, surface, and WMS modules. For details, see the related source code.
46-   The  **test**  folder provides unit testing for each utils API. Refer to it for the usage of utils.
47
48## Repositories Involved<a name="section1371113476307"></a>
49
50[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics-subsystem.md)
51
52[graphic_wms](https://gitee.com/openharmony/graphic_wms/blob/master/README.md)
53
54[graphic_surface](https://gitee.com/openharmony/graphic_surface/blob/master/README.md)
55
56[graphic_ui](https://gitee.com/openharmony/graphic_ui/blob/master/README.md)
57
58# Hals<a name="EN-US_TOPIC_0000001124625243"></a>
59
60-   [Introduction](#section11660541593)
61-   [Directory Structure](#section161941989596)
62-   [Compilation and Building](#section137768191623)
63-   [Description](#section1312121216216)
64    -   [Usage](#section129654513264)
65
66-   [Repositories Involved](#section1371113476307)
67
68## Introduction<a name="section11660541593"></a>
69
70The Hals module adapts and encapsulates the functions related to the driver subsystem and platform, including FrameBuffer, graphics \(GFX\), and single instruction, multiple data \(SIMD\).
71
72**Figure  1**  Dependency between modules of the graphics subsystem and that between graphics modules and the driver subsystem<a name="fig717664212591"></a>
73![](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")
74
75## Directory Structure<a name="section161941989596"></a>
76
77```
78/foundation/graphic/utils
79├── frameworks      # Framework code
80│   ├── hals        # Hardware adaptation layer
81│   ├── linux       # Linux platform adaptation layer
82│   ├── liteos      # LiteOS platform adaptation layer
83│   └── windows     # Windows platform adaptation layer
84├── interfaces      # APIs
85│   ├── innerkits   # APIs between modules
86│   │   └── hals    # APIs of the hardware adaptation layer
87│   └── kits        # External APIs
88└── test            # Unit testing
89```
90
91## Compilation and Building<a name="section137768191623"></a>
92
93```
94# Generate the libgraphic_hals.so file in the out directory of the product folder through GN compilation.
95hb build lite_graphic_utils
96```
97
98## Description<a name="section1312121216216"></a>
99
100### Usage<a name="section129654513264"></a>
101
102-   Hals is used in UI, surface, and WMS modules. For details, see the related source code.
103
104## Repositories Involved<a name="section1371113476307"></a>
105
106[Graphic subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/graphics-subsystem.md)
107
108[graphic_wms](https://gitee.com/openharmony/graphic_wms/blob/master/README.md)
109
110[graphic_surface](https://gitee.com/openharmony/graphic_surface/blob/master/README.md)
111
112[graphic_ui](https://gitee.com/openharmony/graphic_ui/blob/master/README.md)
113
114**graphic_utils**

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/utils
22├── frameworks      # 框架代码
23│   ├── hals        # 硬件适配层
24│   ├── linux       # linux平台适配层
25│   ├── liteos      # liteos平台适配层
26│   └── windows     # windows平台适配层
27├── interfaces      # 接口
28│   ├── innerkits   # 模块间接口
29│   │   └── hals    # 硬件适配层接口
30│   └── kits        # 对外接口
31└── test            # 单元测试
32```
33
34## 编译构建<a name="section137768191623"></a>
35
36```
37# 通过gn编译,在out目录下对应产品的文件夹中生成libgraphic_hals.so
38hb build lite_graphic_utils
39```
40
41## 说明<a name="section1312121216216"></a>
42
43### 使用说明<a name="section129654513264"></a>
44
45-   图形UI/SURFACE/WMS组件均使用了HALS组件,可参考相关源码;
46
47## 相关仓<a name="section1371113476307"></a>
48
49[图形子系统](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)
50
51[graphic_wms](https://gitee.com/openharmony/graphic_wms/blob/master/README_zh.md)
52
53[graphic_surface](https://gitee.com/openharmony/graphic_surface/blob/master/README_zh.md)
54
55[graphic_ui](https://gitee.com/openharmony/graphic_ui/blob/master/README_zh.md)
56
57# 图形UTILS组件<a name="ZH-CN_TOPIC_0000001123083525"></a>
58
59-   [简介](#section11660541593)
60-   [目录](#section161941989596)
61-   [编译构建](#section137768191623)
62-   [说明](#section1312121216216)
63    -   [使用说明](#section129654513264)
64
65-   [相关仓](#section1371113476307)
66
67## 简介<a name="section11660541593"></a>
68
69UTILS组件中定义了图形子系统中的公共数据结构,并提供了一层轻薄的操作系统适配层(如锁、线程、文件系统)。
70
71**图 1**  图形子系统组件间依赖关系<a name="fig717664212591"></a>
72![](figures/图形子系统组件间依赖关系.png "图形子系统组件间依赖关系")
73
74## 目录<a name="section161941989596"></a>
75
76```
77/foundation/graphic/utils
78├── frameworks      # 框架代码
79│   ├── hals        # 硬件适配层
80│   ├── linux       # linux平台适配层
81│   ├── liteos      # liteos平台适配层
82│   └── windows     # windows平台适配层
83├── interfaces      # 接口
84│   ├── innerkits   # 模块间接口
85│   │   └── hals    # 硬件适配层接口
86│   └── kits        # 对外接口
87└── test            # 单元测试
88```
89
90## 编译构建<a name="section137768191623"></a>
91
92```
93# 通过gn编译,在out目录下对应产品的文件夹中生成libgraphic_utils.so
94hb build lite_graphic_utils
95```
96
97## 说明<a name="section1312121216216"></a>
98
99### 使用说明<a name="section129654513264"></a>
100
101-   图形UI/SURFACE/WMS组件均使用了UTILS组件,可参考相关源码;
102-   test提供了UTILS组件各接口的单元测试,也可参考使用。
103
104## 相关仓<a name="section1371113476307"></a>
105
106[图形子系统](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)
107
108[graphic_wms](https://gitee.com/openharmony/graphic_wms/blob/master/README_zh.md)
109
110[graphic_surface](https://gitee.com/openharmony/graphic_surface/blob/master/README_zh.md)
111
112[graphic_ui](https://gitee.com/openharmony/graphic_ui/blob/master/README_zh.md)
113
114**graphic_utils**