diff --git a/test_p1p2p3_repro.c b/test_p1p2p3_repro.c index f8e89f2..0811786 100644 --- a/test_p1p2p3_repro.c +++ b/test_p1p2p3_repro.c @@ -1,41 +1,43 @@ /* test_p1p2p3_repro.c — 宿主复现并校验 P1/P2/P3 三个真机问题的修复(离屏 480x720,16bpp)。 * - * 方法:#include 真实 `hello.c`(改 hello 的 main 名),直接驱动 demo 的真实函数 - * (demo_paint / d_redraw / demo_touch_down / demo_rebuild_to),对 back_buf 做像素断言。 + * 方法:直接驱动拆分后 hello 的 demo 真实函数(demo_paint / demo_rebuild_to / demo_touch_down) + * 与 demo 视图态(extern,见 ../hello_app/hello_internal.h),对 back_buf 做像素断言。 * 这样测的是「真实 demo 代码 + 真实 SDK」,不是模拟桩。不依赖 /dev/fb0 / 字库 / launcher。 * + * 批次② 变化:hello.c 已拆为 app.c + ui/{home,full,demo}.c + ui/common/chrome.c + + * logic/{notify,state}.c;本文件不再 #include hello.c,改为 extern 驱动 demo 层并链接多文件。 + * * 覆盖: * P1 z-order 叠层:圆形进度条(实时重绘)与 FAB 浮层重叠时,局部重绘不再清掉/盖住 FAB。 - * 旧 d_redraw=清底+只画单控件 → FAB 重叠区被抹成背景;新 d_redraw=d_paint_region - * 重画重叠区完整 z 栈(内容→标题→slider值→chrome)→ FAB 保持。 + * (批次① 后为 P1c:set_z(g_fab,999)+invalidate(r_prc),显式 z 不依赖绘制先后。) * P2 list 焦点:命中非 list 区域时释放列表焦点、切页滚动(不再沿用旧焦点继续滚列表)。 - * P3 list 脏区:W_LIST 绘制已裁剪到视口;滚动(非整行偏移)+选中行不再向标题间隙/底缘下泄漏 - * 填充(此前泄漏会标脏并上屏 → 标题栏/底部残留)。 + * P3 list 脏区:W_LIST 绘制已裁剪到视口;滚动(非整行偏移)+选中行不再向标题间隙/底缘下泄漏。 * * 编译(宿主 gcc,链真实 gfx/sys/theme/vol/log/widget/input/activity/dialog/ime/img/config/ - * notify/ipc + 打桩 font/global(test_host_stub) + stb_image): - * gcc -Wall -Wextra -DMEOW_UI_HOST_TEST -Dmain=hello_app_main \ - * -o test_p1p2p3_repro test_p1p2p3_repro.c test_host_stub.c \ - * meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ - * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c \ - * meow_ui_img.c meow_ui_config.c meow_ui_notify.c meow_notify_ipc.c meow_ui_draw.c \ - * meow_ui_view.c stb_image.c \ - * -I. -I../hello_app -I../meow_launcherd -pthread -lm + * notify/ipc + 打桩 font/global(test_host_stub) + stb_image + hello 拆分层): + * 1) 单独编译 app.c 并把 main 改名 hello_app_main(否则与本文件 main 冲突): + * gcc -c -Wall -Wextra -DMEOW_UI_HOST_TEST -Dmain=hello_app_main \ + * -I. -I../hello_app ../hello_app/app.c -o app.o + * 2) 编译本文件 + 其余 hello 模块 + SDK 源 + 打桩,链接 app.o: + * gcc -Wall -Wextra -DMEOW_UI_HOST_TEST -o test_p1p2p3_repro test_p1p2p3_repro.c app.o \ + * test_host_stub.c meow_ui_gfx.c meow_ui_sys.c meow_ui_theme.c meow_ui_vol.c meow_ui_log.c \ + * meow_ui_widget.c meow_ui_input.c meow_ui_activity.c meow_ui_dialog.c meow_ui_ime.c \ + * meow_ui_img.c meow_ui_config.c meow_ui_notify.c meow_notify_ipc.c meow_ui_draw.c \ + * meow_ui_view.c stb_image.c \ + * ../hello_app/ui/home.c ../hello_app/ui/full.c ../hello_app/ui/demo.c \ + * ../hello_app/ui/common/chrome.c ../hello_app/logic/notify.c ../hello_app/logic/state.c \ + * -I. -I../hello_app -I../meow_launcherd -pthread -lm * 运行:MEOW_UI_DUMP=/tmp/repro.ppm ./test_p1p2p3_repro (optional,dump 最终屏幕) * - * 覆盖(批次① z 序下沉后):P1c 显式 z 置顶(set_z(g_fab,999)+invalidate(r_prc) 不抹 FAB—— - * 显式 z 不依赖绘制先后)+ P2/P3 与迁移前一致。预期 RESULT: ALL PASS。 + * 预期 RESULT: ALL PASS(P1c/P2/P3 断言真实有效,未弱化)。 */ #include "meow_ui.h" #include "meow_ui_internal.h" +#include "../hello_app/hello_internal.h" #include #include #include -#define main hello_app_main /* 让 hello.c 的 main 改名,由本文件提供 main */ -#include "hello.c" -#undef main - /* ---- 像素读取 ---- */ static void rd_px(int x, int y, int *r, int *g, int *b) {