| ColorPicker: Add QuickSkip support and HWC intersection handling Implement ColorPicker functionality for QuickSkip scenarios where surface nodes are skipped during preparation but still require color picking. Changes: - Add ColorPicker drawable preparation in skipped subtrees via PrepareColorPickerDrawableInSkippedSubTree() - Add HWC node disable logic when surfaces intersect ColorPicker regions via UpdateHwcNodeEnableByColorPicker() and ProcessSurfaceForColorPicker() - Add ChildHasVisibleColorPicker() check for render nodes - Add surface marking for intersection checking during Prepare phase - Add OnDraw lifecycle trace in RSColorPickerDrawable for debugging - Remove duplicate test code (~540 lines) in RSColorPickerManagerTest - Remove verbose debug traces, keep only essential error logs This ensures ColorPicker works correctly when parent surfaces are quick-skipped for performance optimization. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Change-Id: Icb16eb159e8c9631972f5f13da1010fd563f2f10 Signed-off-by: Tianer Zhou <zhoutianer@huawei.com> | 5 个月前 |
| 更改动画codeOwner Co-Authored-By: Agent Signed-off-by: yanghua_angel <yanghua58@huawei.com> | 14 天前 |
| linux arm64编译sdk-graphic_graphic_2d Signed-off-by: liangxinyan123 <liangxinyan2@huawei.com> | 1 年前 |
| !31157 merge uinode into master 客户端多实例文档补充 Created-by: zhangzhichao0091 Commit-by: zhangzhichao0091 Merged-by: openharmony_ci Description: **Description:** **Issue number:https://gitcode.com/openharmony/graphic_graphic_2d/issues/24811** **Test & Result:** **CodeCheck:** <table> <thead> <tr> <th>类型</th> <th>自检项</th> <th>自检结果</th> </tr> </thead> <tbody> <tr> <td rowspan="2"><strong>多线程</strong></td> <td>在类的成员变量中定义了vector/map/list等容器类型,且在多个成员函数中有操作时,需要加锁保护</td> <td>自检结果:</td> </tr> <tr> <td>定义全局变量,在多个函数中都有操作时,需要加锁保护</td> <td>自检结果:</td> </tr> <tr> <td rowspan="4"><strong>内存操作</strong></td> <td>调用外部接口时,确认是否对返回值做了判空判断,尤其外部接口返回了nullptr的情况,避免进程崩溃</td> <td>自检结果:</td> </tr> <tr> <td>内存操作优先使用安全函数,并检查其返回值</td> <td>自检结果:</td> </tr> <tr> <td>注意每个异常退出流程,是否都已经将资源释放(推荐使用RAII)</td> <td>自检结果:</td> </tr> <tr> <td>隐式内存分配场景:realpath、ReadParcelable序列化、cJSON相关函数时等,需主动释放或使用智能指针</td> <td>自检结果:</td> </tr> <tr> <td rowspan="3"><strong>外部输入</strong></td> <td>所有外部输入均不可信,需判断外部输入是否直接作为内存分配的大小,数组下标、循环条件、SQL查询等</td> <td>自检结果:</td> </tr> <tr> <td>注意外部字符串数据有无尾0</td> <td>自检结果:</td> </tr> <tr> <td>外部输入的路径不可信,需使用realpath做标准化处理,并判断路径的合法性</td> <td>自检结果:</td> </tr> <tr> <td><strong>敏感信息</strong></td> <td>注意日志中打印敏感信息需匿名化</td> <td>自检结果:</td> </tr> <tr> <td><strong>数学运算</strong></td> <td>代码中是否混合了加减乘除等运算,需检查是否可能导致整数溢出或符号翻转</td> <td>自检结果:</td> </tr> <tr> <td><strong>初始化</strong></td> <td>类成员、局部变量使用前需初始化</td> <td>自检结果:</td> </tr> <tr> <td><strong>权限管理</strong></td> <td>作为系统服务对外提供了接口(或RSCmd),是否做了权限保护和校验,只允许申请了权限的应用访问</td> <td>自检结果:</td> </tr> </tbody> </table> ### L0新增用例自检结果 - [ ] 是,有新增L0用例,且完成自检 - [ ] 否 See merge request: openharmony/graphic_graphic_2d!31157 | 9 天前 |
| delete ddgr cloud push Signed-off-by: zzzzzmeng <zhaomeng90@huawei.com> | 7 个月前 |
| delete module frame rectify Signed-off-by: baizengqiang <baizengqiang1@huawei.com> | 1 年前 |
| !31467 merge fix/bootanimation-readimage-memcpy into master fix(bootanimation): avoid memcpy_s failure at zip EOF in ReadImageFile Created-by: OningO Commit-by: 张宁 Merged-by: openharmony_ci Description: ## Description bootanimation 走图片序列帧播放路径时,ReadImageFile(util.cpp)的 do-while 循环在 unzReadCurrentFile 返回 0(正常 EOF)时仍执行一次 memcpy_s,此时 destMax = size - totalLen = 0、count = 0。OHOS securec 在 destMax == 0 时返回 ERANGE 而非 EOK,导致 memcpy_s failed. 并返回 false,ReadZipFile 失败,imgVec 为空(pic num: 0),开机动画不播放任何帧。 此外 ReadPicZipFile 忽略 ReadZipFile 返回值并总返回 true,掩盖了失败。 ### 修改内容 1. **util.cpp** Fix 1:do-while 中 readLen == 0 时 break,不再调用 memcpy_s,避免 EOF 时 destMax=0 触发 ERANGE。 2. **boot_picture_player.cpp** Fix 2:检查 ReadZipFile 返回值,失败时返回 false,不再掩盖失败。 ## Issue number #25052 ## Test & Result 新增 4 个单测(util_test.cpp、boot_picture_player_test.cpp): | 用例 | 覆盖点 | 修复前 | 修复后 | |---|---|---|---| | ReadZipFile_ValidZip_ReturnTrueAndNonEmptyVec | Bug 1: 用 minizip write API 创建真实 zip,验证 ReadZipFile 成功且 imgVec 非空 | 失败(memcpy_s failed → return false) | 通过 | | ReadZipFile_EmptyEntryInZip_ReturnTrue | Bug 1: 零大小 entry 的 readLen==0 break 路径 | 失败(memPtr is null → return false) | 通过 | | ReadPicZipFile_EmptyParams_PropagateReadZipResult | Bug 2: 根据 /system/etc/graphic/bootpic.zip 是否存在自适应断言 | 总返回 true(掩盖失败) | 正确传递返回值 | | ReadPicZipFile_ValidZip_ReturnTrue | 端到端覆盖 Fix 1 + Fix 2 | 失败 | 通过 | **静态验证**:git diff --check(CRLF 误报已确认)、clang-format-diff.py 通过、符号引用核对通过。 **未执行**:设备构建和单测运行(缺少 OHOS 构建环境)。新增的 ReadZipFile_ValidZip_ReturnTrueAndNonEmptyVec 用 minizip write API 创建临时 zip,在 OHOS 单测环境(链接 zlib:shared_libz,include 路径含 contrib/minizip)下可直接编译运行。 ## CodeCheck | 类型 | 自检项 | 自检结果 | |---|---|---| | **多线程** | 类成员容器多函数操作需加锁 | 不涉及:本次修改在单线程的 EventHandler 任务路径上,无新增多线程访问 | | **多线程** | 全局变量多函数操作需加锁 | 不涉及 | | **内存操作** | 外部接口返回值判空 | 通过:memBuffer == nullptr 检查保留,readLen == 0 在判空前 break | | **内存操作** | 内存操作优先使用安全函数并检查返回值 | 通过:保留 memcpy_s 返回值检查,readLen == 0 时不调用避免 ERANGE | | **内存操作** | 异常退出释放资源(RAII) | 通过:imageStruct 使用 shared_ptr,MemStruct 析构释放 | | **内存操作** | 隐式内存分配(realpath/cJSON)释放 | 不涉及:本次修改无新增隐式分配 | | **外部输入** | 外部输入不可信(内存大小/下标/循环条件) | 通过:fileSize 来自 zip header,static_cast<int> 后 size - totalLen 在 break 保证下不会出现负值 destMax | | **外部输入** | 外部字符串尾0 | 不涉及 | | **外部输入** | 外部输入路径 realpath 标准化 | 不涉及:本次修改无新增路径处理 | | **敏感信息** | 日志匿名化 | 通过:无敏感信息打印 | | **数学运算** | 整数溢出/符号翻转 | 不涉及:readLen == 0 break 后 totalLen 不再增长 | | **初始化** | 类成员/局部变量使用前初始化 | 通过:readLen 初始化为 UNZ_OK,totalLen 初始化为 0 | | **权限管理** | 系统服务接口权限保护 | 不涉及 | ### L0新增用例自检结果 - [x] 是,有新增L0用例,且完成自检 See merge request: openharmony/graphic_graphic_2d!31467 | 26 分钟前 |
| !31360 merge remoteSync into master remove SDFDistortOpShape Sync Created-by: songmengxiang_ Commit-by: songmengxiang Merged-by: openharmony_ci Description: **Description:** Sync 字段没必要,需要移除 **Issue number:** https://gitcode.com/openharmony/graphic_graphic_2d/issues/24957 **Test & Result:** **CodeCheck:** <table> <thead> <tr> <th>类型</th> <th>自检项</th> <th>自检结果</th> </tr> </thead> <tbody> <tr> <td rowspan="2"><strong>多线程</strong></td> <td>在类的成员变量中定义了vector/map/list等容器类型,且在多个成员函数中有操作时,需要加锁保护</td> <td>自检结果:pass</td> </tr> <tr> <td>定义全局变量,在多个函数中都有操作时,需要加锁保护</td> <td>自检结果:pass</td> </tr> <tr> <td rowspan="4"><strong>内存操作</strong></td> <td>调用外部接口时,确认是否对返回值做了判空判断,尤其外部接口返回了nullptr的情况,避免进程崩溃</td> <td>自检结果:pass</td> </tr> <tr> <td>内存操作优先使用安全函数,并检查其返回值</td> <td>自检结果:pass</td> </tr> <tr> <td>注意每个异常退出流程,是否都已经将资源释放(推荐使用RAII)</td> <td>自检结果:pass</td> </tr> <tr> <td>隐式内存分配场景:realpath、ReadParcelable序列化、cJSON相关函数时等,需主动释放或使用智能指针</td> <td>自检结果:pass</td> </tr> <tr> <td rowspan="3"><strong>外部输入</strong></td> <td>所有外部输入均不可信,需判断外部输入是否直接作为内存分配的大小,数组下标、循环条件、SQL查询等</td> <td>自检结果:pass</td> </tr> <tr> <td>注意外部字符串数据有无尾0</td> <td>自检结果:pass</td> </tr> <tr> <td>外部输入的路径不可信,需使用realpath做标准化处理,并判断路径的合法性</td> <td>自检结果:pass</td> </tr> <tr> <td><strong>敏感信息</strong></td> <td>注意日志中打印敏感信息需匿名化</td> <td>自检结果:pass</td> </tr> <tr> <td><strong>数学运算</strong></td> <td>代码中是否混合了加减乘除等运算,需检查是否可能导致整数溢出或符号翻转</td> <td>自检结果:pass</td> </tr> <tr> <td><strong>初始化</strong></td> <td>类成员、局部变量使用前需初始化</td> <td>自检结果:pass</td> </tr> <tr> <td><strong>权限管理</strong></td> <td>作为系统服务对外提供了接口(或RSCmd),是否做了权限保护和校验,只允许申请了权限的应用访问</td> <td>自检结果:pass</td> </tr> </tbody> </table> ### L0新增用例自检结果 - [ ] 是,有新增L0用例,且完成自检 - [ ] 否 See merge request: openharmony/graphic_graphic_2d!31360 | 3 小时前 |
| !31501 merge fix-security-alerts into master fix: harden graphics security checks Created-by: tong_zhang16 Commit-by: tong_zhang16 Merged-by: openharmony_ci Description: ## Summary - validate ANI/NAPI/Taihe inputs, collection bounds, nullable objects, and conversion ranges - harden render nodes, filters, color picker, and cache paths against invalid state and overflow - fix ownership lifetime and shared-state concurrency issues ## Related issue - #25077 ## Test Plan - [x] Reviewed the complete staged diff - [x] Verified no whitespace errors, accounting for existing CRLF files - [ ] Unit tests were not added as requested - [ ] Build was not run as requested See merge request: openharmony/graphic_graphic_2d!31501 | 3 小时前 |
| !31540 merge secRound02 into master secRound02 Created-by: gao_yufan Commit-by: gao_yufan Merged-by: openharmony_ci Description: **Description:** https://gitcode.com/openharmony/graphic_graphic_2d/issues/25113 **Issue number:** 25113 **Test & Result:** **CodeCheck:** <table> <tr> <th>类型</th><th>自检项</th><th>自检结果</th> </tr> <tr> <td rowspan="2">多线程相关</td><td>在类的成员变量中定义了vector/map/list等容器类型,且在多个成员函数中有操作时,需要加锁保护</td><td>自检结果:Pass</td> </tr> <tr> <td>定义全局变量,在多个函数中都有操作时,需要加锁保护</td><td>自检结果:Pass</td> </tr> <tr> <td rowspan="4">内存相关</td><td>调用外部接口时,确认是否对返回值做了判断,尤其外部接口返回了nullptr的情况,避免进程崩溃</td><td>自检结果:Pass</td> </tr> <tr> <td>调用安全函数时,如memcpy_s等,是否检查其返回值</td><td>自检结果:Pass</td> </tr> <tr> <td>检查函数中是否涉及了内存或资源申请(如文件句柄),注意每个异常退出流程,是否都已经将资源释放(推荐使用RAII)</td><td>自检结果:Pass</td> </tr> </tr> <tr> <td>隐式内存分配场景:realpath、ReadParcelable序列化、cJSON相关函数时等,需主动释放或使用智能指针</td><td>自检结果:Pass</td> </tr> <tr> <td rowspan="4">校验外部输入</td><td>使用nlohmann:json解析外部输入时,需判断参数类型是否符合预期</td><td>自检结果:Pass</td> </tr> <tr> <td>所有外部输入均不可信,需判断外部输入是否直接作为内存分配的大小,数组下标、循环条件、SQL查询等</td><td>自检结果:Pass</td> </tr> <tr> <td>外部输入的路径不可信,需使用realpath做标准化处理,并判断路径的合法性</td><td>自检结果:Pass</td> </tr> <tr> <td>外部输入包括对外提供的接口,IPC的proxy/stub接口,序列化/反序列化接口等</td><td>自检结果:Pass</td> </tr> </tr> <tr> <td rowspan="2">数学运算</td><td>代码中是否混合了加减乘除等运算,需检查是否可能导致整数溢出或符号翻转</td><td>自检结果:Pass</td> </tr> <tr> <td>需检查代码是否有高精度数字转换为低精度的操作,如果必须,建议使用C++安全类型转换接口</td><td>自检结果:Pass</td> </tr> </tr> <tr> <td rowspan="1">秘钥相关</td><td>如变量临时保存了口令、秘钥等,需要在使用完成后及时清空(内存memset掉)</td><td>自检结果:Pass</td> </tr> <tr> <td rowspan="2">权限相关</td><td>作为系统服务对外提供了接口,是否做了权限保护和校验(如需要),只允许申请了权限的应用访问</td><td>自检结果:Pass</td> </tr> <tr> <td>内核对外提供了设备节点,是否做了权限保护,只允许特定的系统服务访问</td><td>自检结果:Pass</td> </tr> </tr> <tr> <td rowspan="3">内核操作</td><td>如有mmap操作,并使用remap_pfn_range进行地址映射时,校验起始地址是否是用户态输入且没有做合法性校验</td><td>自检结果:Pass</td> </tr> <tr> <td>是否有copy_from_user,并对外部输入的数据做了长度校验,以防止缓冲区溢出</td><td>自检结果:Pass</td> </tr> <tr> <td>是否有使用copy_to_user,并在返回到用户态时,对数据做了完整初始化,或使用memset清空后再赋值</td><td>自检结果:Pass</td> </tr> </tr> </table> See merge request: openharmony/graphic_graphic_2d!31540 | 32 分钟前 |
| add cfi check Signed-off-by: alexci <chuliangliang2@h-partners.com> Change-Id: Ia340e4f934b1d33bab6ed43066c69724a4ffead8 Change-Id: Ide9883715e14d7350c7b97bc48fb05ab39785e89 | 2 天前 |
| WIP: fix compile errors Signed-off-by: Zhang Peng <zhangpeng280@huawei.com> Change-Id: Ia7890859e556fec25b0b1278532a919d1fc21004 | 10 个月前 |
| update OpenHarmony 2.0 Canary | 5 年前 |
| fix warning Signed-off-by: Tianer Zhou <zhoutianer@huawei.com> Change-Id: I382b27bc35d2392d1672120575dd07cd92a301fa | 5 个月前 |
| docs(knowledge): remove build commands and single-repo compile notes Remove ./build.sh and ninja build command snippets from AGENTS.md, knowledge docs and task templates. Unify verification guidance to static checks only, dropping single-repo compile workaround notes. Signed-off-by: yaozhupeng <yaozhupeng@huawei.com> Co-Authored-By: Agent Signed-off-by: yaozhupeng <yaozhupeng@huawei.com> 🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> | 16 天前 |
| 编译规范告警整改 Signed-off-by: liuyangyang <liuyangyang58@huawei.com> | 1 个月前 |
| update OpenHarmony 2.0 Canary | 5 年前 |
| add fuzz test seed and update test case Signed-off-by: developer <liuyongkang4@huawei.com> | 1 年前 |
| quduoyu Signed-off-by: cwx1252618 <chaifu1@huawei.com> Change-Id: I967db2417529b55e12e397a7a929208d8433e397 | 3 年前 |
| fix name Signed-off-by: zhangbirong <zhangbirong@huawei.com> Change-Id: I6f98c8a595b52a49e2ffffecadec917d12f82674 | 2 年前 |
| Fixed arkui-x build due to missed adapters Signed-off-by: Ilya Tihobaev <tihobaev.ilya@huawei-partners.com> Change-Id: Ic83d408ec93ce2a393686c1294fd1ab2e51227a2 | 2 年前 |
| feat(render_service): add TV shutter 3D mode support - Add RsTvShutter3DManager for managing TV 3D shutter mode - Update screen/surface render nodes to support 3D UI mode - Extend HWC visitor to handle 3D mode parameters - Add IPC interfaces for SetUIMode3D command - Add unit tests and fuzz tests for 3D mode functionality - Update bundle.json and graphic_config.gni for 3D feature Co-Authored-By: Agent Signed-off-by: testwubo <wubo105@huawei.com> | 4 天前 |
| add window type Change-Id: I1ed9d4e2408990f4d8f969c55996c84d0689932d Signed-off-by: lizheng <lizheng2@huawei.com> | 4 年前 |
| Description:change dir graphic/graphic to graphic/graphic_2d IssueNo:https://gitee.com/openharmony/graphic_standard/issues/I57W1P Feature or Bugfix: Bugfix Binary Source:NA Signed-off-by: sufeng <sufeng6@huawei.com> | 4 年前 |
| delete ddgr cloud push Signed-off-by: zzzzzmeng <zhaomeng90@huawei.com> | 7 个月前 |
| 回退 'Pull Request !3058 : del unused code' | 3 年前 |
| feat(render_service): add TV shutter 3D mode support - Add RsTvShutter3DManager for managing TV 3D shutter mode - Update screen/surface render nodes to support 3D UI mode - Extend HWC visitor to handle 3D mode parameters - Add IPC interfaces for SetUIMode3D command - Add unit tests and fuzz tests for 3D mode functionality - Update bundle.json and graphic_config.gni for 3D feature Co-Authored-By: Agent Signed-off-by: testwubo <wubo105@huawei.com> | 4 天前 |
| 蓝黄差异同步 Signed-off-by: white-dragon-tiger <bailonghu1@huawei.com> | 5 个月前 |