1e9297d28Sopenharmony_ci# graphic_2d
2e9297d28Sopenharmony_ci
3e9297d28Sopenharmony_ci-   [简介](#简介)
4e9297d28Sopenharmony_ci-   [目录](#目录)
5e9297d28Sopenharmony_ci-   [相关仓](#相关仓)
6e9297d28Sopenharmony_ci
7e9297d28Sopenharmony_ci## 简介
8e9297d28Sopenharmony_ci
9e9297d28Sopenharmony_ci**Graphic子系统** 提供了图形接口能力。
10e9297d28Sopenharmony_ci
11e9297d28Sopenharmony_ci其主要的结构如下图所示:
12e9297d28Sopenharmony_ci
13e9297d28Sopenharmony_ci![Graphic子系统架构图](./figures/graphic_rosen_architecture.jpg)
14e9297d28Sopenharmony_ci
15e9297d28Sopenharmony_ciOpenHarmony 图形栈的分层说明如下:
16e9297d28Sopenharmony_ci
17e9297d28Sopenharmony_ci• 接口层:提供图形的 Native API能力,包括:WebGL、Native Drawing的绘制能力、OpenGL 指令级的绘制能力支撑等。
18e9297d28Sopenharmony_ci
19e9297d28Sopenharmony_ci• 框架层:分为 Render Service、Drawing、Animation、Effect、显示与内存管理五个模块。
20e9297d28Sopenharmony_ci| 模块                     | 能力描述                                                                                       |
21e9297d28Sopenharmony_ci|------------------------|--------------------------------------------------------------------------------------------|
22e9297d28Sopenharmony_ci| Render Servicel (渲染服务) | 提供UI框架的绘制能力,其核心职责是将ArkUI的控件描述转换成绘制树信息,根据对应的渲染策略,进行最佳路径渲染。同时,负责多窗口流畅和空间态下UI共享的核心底层机制。       |
23e9297d28Sopenharmony_ci| Drawing (绘制)           | 提供图形子系统内部的标准化接口,主要完成2D渲染、3D渲染和渲染引擎的管理等基本功能。                                                |
24e9297d28Sopenharmony_ci| Animation (动画)         | 提供动画引擎的相关能力。                                                                               |
25e9297d28Sopenharmony_ci| Effect (效果)            | 主要完成图片效果、渲染特效等效果处理的能力,包括:多效果的串联、并联处理,在布局时加入渲染特效、控件交互特效等相关能力。                               |
26e9297d28Sopenharmony_ci| 显示与内存管理                | 此模块是图形栈与硬件解耦的主要模块,主要定义了OpenHarmony 显示与内存管理的能力,其定义的南向HDI 接口需要让不同的OEM厂商完成对OpenHarmony图形栈的适配. |
27e9297d28Sopenharmony_ci
28e9297d28Sopenharmony_ci• 引擎层:包括 2D 图形库和 3D 图形引擎两个模块。2D 图形库提供 2D 图形绘制底层 API,支持图形绘制与文本绘制底层能力。3D 图形引擎能力尚在构建中。
29e9297d28Sopenharmony_ci
30e9297d28Sopenharmony_ci
31e9297d28Sopenharmony_ci## 目录
32e9297d28Sopenharmony_ci```
33e9297d28Sopenharmony_cifoundation/graphic/graphic_2d/
34e9297d28Sopenharmony_ci├── figures                 # Markdown引用的图片目录
35e9297d28Sopenharmony_ci├── frameworks              # 框架代码目录
36e9297d28Sopenharmony_ci│   ├── animation_server    # AnimationServer代码
37e9297d28Sopenharmony_ci│   ├── bootanimation       # 开机动画目录
38e9297d28Sopenharmony_ci│   ├── fence               # fence代码
39e9297d28Sopenharmony_ci│   ├── opengl_wrapper      # opengl_wrapper
40e9297d28Sopenharmony_ci│   ├── surface             # Surface代码
41e9297d28Sopenharmony_ci│   ├── surfaceimage        # surfaceimage代码
42e9297d28Sopenharmony_ci│   ├── vsync               # Vsync代码
43e9297d28Sopenharmony_ci│   ├── wm                  # wm代码
44e9297d28Sopenharmony_ci│   ├── wmserver            # wmserver代码
45e9297d28Sopenharmony_ci│   ├── wmservice           # wmservice代码
46e9297d28Sopenharmony_ci│   ├── wmtest              # wmtest代码
47e9297d28Sopenharmony_ci├── rosen                   # 框架代码目录
48e9297d28Sopenharmony_ci│   ├── build               # 构建说明
49e9297d28Sopenharmony_ci│   ├── doc                 # doc
50e9297d28Sopenharmony_ci│   ├── include             # 对外头文件代码
51e9297d28Sopenharmony_ci│   ├── modules             # graphic 子系统各模块代码
52e9297d28Sopenharmony_ci│   ├── samples             # 实例代码
53e9297d28Sopenharmony_ci│   ├── test                # 开发测试代码
54e9297d28Sopenharmony_ci│   ├── tools               # 工具代码
55e9297d28Sopenharmony_ci├── interfaces              # 图形接口存放目录
56e9297d28Sopenharmony_ci│   ├── inner_api           # 内部native接口存放目录
57e9297d28Sopenharmony_ci│   └── kits                # js/napi外部接口存放目录
58e9297d28Sopenharmony_ci└── utils                   # 小部件存放目录
59e9297d28Sopenharmony_ci```
60e9297d28Sopenharmony_ci
61e9297d28Sopenharmony_ci
62e9297d28Sopenharmony_ci## 相关仓
63e9297d28Sopenharmony_ci- [**graphic_graphic_2d**](https://gitee.com/abbuu_openharmony/graphic_graphic_2d)
64e9297d28Sopenharmony_ci- [arkui_ace_engine](https://gitee.com/openharmony/arkui_ace_engine)
65e9297d28Sopenharmony_ci- [ability_ability_runtime](https://gitee.com/openharmony/ability_ability_runtime)
66e9297d28Sopenharmony_ci- [multimedia_player_framework](https://gitee.com/openharmony/multimedia_player_framework)
67e9297d28Sopenharmony_ci- [multimedia_image_framework](https://gitee.com/openharmony/multimedia_image_framework)
68e9297d28Sopenharmony_ci- [Windowmanager](https://gitee.com/openharmony/windowmanager)
69e9297d28Sopenharmony_ci- [third_party_egl](https://gitee.com/openharmony/third_party_egl)
70e9297d28Sopenharmony_ci- [third_party_opengles](https://gitee.com/openharmony/third_party_opengles)
71e9297d28Sopenharmony_ci- [third_party_skia](https://gitee.com/openharmony/third_party_skia)
72e9297d28Sopenharmony_ci- [third_party_giflib](https://gitee.com/openharmony/third_party_giflib)
73