Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
fix(ui-mig): G1.1 easing curves as whole cubic segments matching the CSS springs
Veyra Goal Agent6e509999b699
diff --git a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md b/docs/UI_FULL_GOAL_PLAN_2026-09-26.mdindex f4b127ed..0f8867f0 100644--- a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md+++ b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md@@ -10,7 +10,7 @@| 阶段 | 状态 | 最后标签 | 备注 ||---|---|---|---|| G0 工具与基线 | 完成 | checkpoint/ui-mig-g0.7 | 设计参考 `design-ref/`、对比 `compare/`、动效曲线 `goal/g0.5/`、缓动测试 `veyra_qml_easing_tests`(构建目录 `build/qt-probe-20260926`)、门槛基线 `goal/g0.7/`(B 阶段性能对比用 `goal/g0.7/perf`) |-| G1 基础(缓动/背景/字体/图标/组件动效) | 进行中 | | 下一步 G1.1 |+| G1 基础(缓动/背景/字体/图标/组件动效) | 进行中 | checkpoint/ui-mig-g1.1 | G1.1 完成(Qt 6.8.3 BezierSpline 上限 10 段,spring 已降段);下一步 G1.2 背景 || G2 外壳 | 未开始 | | || G3 四主屏 | 未开始 | | || B1 小项 + 桥接补齐 | 未开始 | | |diff --git a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md b/docs/UI_MIGRATION_EXECUTION_2026-09-25.mdindex ef969ab3..6dd125e7 100644--- a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md+++ b/docs/UI_MIGRATION_EXECUTION_2026-09-25.md@@ -43,6 +43,7 @@| G0.5 | 动效采样(设计 vs QML) | 完成(曲线已看) | `checkpoint/ui-mig-g0.5` | `tools/qt_probe/motion-sample.ps1`;设计端 `shotpage.js ?motion=1&probe=` 暂停 Web Animations 按 10ms 定位读值,QML 端 `--motion-probe` 每帧记日志。证据 `goal\g0.5\`(design/qml CSV + chart)。dock:设计 110ms 到位、130ms 超调峰 10.17px,QML 线性 566ms 到 8px 无超调;开关:设计峰 14.6px,QML 线性 500ms;页面切换:设计 rise 16→0 约 150ms,QML 无过渡。证实 4 值 bezierCurve 退化为线性(G1.1)与缺页面进入动画(G2.2) || G0.6 | 缓动单元测试 `veyra_qml_easing_tests` | 完成(修前失败,符合预期) | `checkpoint/ui-mig-g0.6` | `tests/qml/QmlEasingTests.cpp` 通过 QML 读回 NumberAnimation 的曲线,与 CSS `linear()` / `cubic-bezier` 求值比较(容差 0.01)。修前三条曲线类型均为 0(Linear),最大误差 spring 0.81、springSoft 0.76、easeOut 0.53(`goal\g0.6\before-fix.txt`)。构建目录改为 `build\qt-probe-20260926`:旧目录 CMake 不再写 `rules.ninja`,根因是 936 代码页下 include-probe 前缀乱码(与 WORKLOG 0.0.4 同一故障),`build-qt-probe.ps1` 现以 65001 调用并加 `-Out` || G0.7 | 全部门槛基线 | 完成 | `checkpoint/ui-mig-g0.7` | 证据 `goal/g0.7/`。构建 exit 0、stage 0;哈希 17/17 same;性能与 perf-baseline 同量级,提交 fps 全同,plain-1080 gpuReady P95 1.57→2.68ms(本轮未动引擎,按本轮基线记录);delivery PASS;单元 pass=44 fail=33 skip=3 与基线一致 |+| G1.1 | 缓动曲线改 6 值段 | 完成 | `checkpoint/ui-mig-g1.1` | 证据 `goal/g1.1/`。Theme `linearEasing()` 把 CSS linear() 停靠点逐段转三次段;veyra_qml_easing_tests 三曲线全过(spring 10 段误差 0.0068、springSoft/easeOut 0.0000)。Qt 6.8.3 缺陷:BezierSpline ≥11 段销毁时堆损坏(C++ 无 QML 复现,n≤10 正常),spring 删 28.4%/38.5% 两个停靠点降到 10 段,测试加段数上限检查(12 段版被判 FAIL,记录 12seg-caught.txt)。动效采样 dock 峰值 10.59 vs 设计 10.17、开关 14.6 vs 14.6;页面切换仍无过渡,属 G2.2 |## 发现并修复的 bugdiff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 905f92ae..5de876a1 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -6570,3 +6570,12 @@ release. 5090 live acceptance, 15-second hitch and user flicker remain unresolvenr-fg-4k 1.383→1.279,提交 fps 60/120/120/60 全同;plain-1080 gpuReady P95 1.57→2.68ms(本轮未改引擎,视为机器状态波动,作为本轮 B 阶段比较基线另记);`delivery.ps1` PASS;单元 pass=44 fail=33 skip=3,与基线一致。G0 阶段完成。++- G1.1 缓动(证据 `E:/项目/Veyra/logs/ui-qml-migration-20260925/goal/g1.1/`):+ `qml/Veyra/Theme.qml` 新增 `linearEasing(stops)`,CSS linear() 相邻停靠点各转一段三次(控制点 1/3、2/3),easeOut 为单段 6 值。+ 首次测试两条弹簧误差 0.0000 后进程 0xC0000374 堆损坏;在 C++ 中不经 QML 直接构造 n 段 BezierSpline 复现:+ n=1..10 正常,n=11/12 在复制销毁时崩溃,属 Qt 6.8.3 自身缺陷。spring 原 12 段,删去 [email protected]% 与 [email protected]%+ 两点降为 10 段,最大误差 0.0068(阈值 0.01)。测试新增“段数 >10 判失败”,旧 12 段 Theme 被判 FAIL(12seg-caught.txt)。+ 命令:`scripts/build-qt-probe.ps1 -Targets veyra_qml_easing_tests` / `veyra_qml_ui` exit 0;+ `tools/qt_probe/run-easing-tests.ps1` failures=0 exit=0(after-fix.txt);`tools/qt_probe/motion-sample.ps1 -Out goal/g1.1`:+ dock 峰值 QML 10.59 / 设计 10.17,开关 14.6 / 14.6,曲线图已看;page 仍无过渡(G2.2)。diff --git a/qml/Veyra/Theme.qml b/qml/Veyra/Theme.qmlindex 221e1076..0e47d58a 100644--- a/qml/Veyra/Theme.qml+++ b/qml/Veyra/Theme.qml@@ -50,8 +50,18 @@ QtObject {readonly property int rCtl: 10// --- motion (--spring / --spring-soft / --out) ------------------------- // Four control points exactly: QEasingCurve.BezierSpline rejects any other- // count, and a rejected curve silently falls back to linear.+ // easing.bezierCurve takes whole cubic segments, six numbers each+ // [c1x, c1y, c2x, c2y, endX, endY], the last one ending at (1, 1). Any other+ // length is rejected and the animation silently runs linear (G0.5/G0.6 caught+ // the old four-number curves doing exactly that).+ // --spring and --spring-soft are CSS linear() functions: straight lines between+ // stops. A cubic with its control points at 1/3 and 2/3 of a line is that line,+ // so each stop becomes one segment and the curve matches the design exactly,+ // overshoot included. Stops without a position are spread evenly, as in CSS.+ // At most 10 segments: Qt 6.8.3 corrupts the heap when a BezierSpline curve of+ // 11+ segments is destroyed (reproduced in C++ with no QML, G1.1). --spring has+ // 12, so its [email protected]% and [email protected]% stops are dropped; the remaining line+ // stays within 0.007 of the design curve (veyra_qml_easing_tests checks 0.01).// Reduced motion (the design's .vy.reduced: every transition and animation at// 0s). Main.qml binds it to the saved setting or the --reduced-motion switch;// every duration in the app goes through d(), so one flag covers all of them.@@ -62,9 +72,28 @@ QtObject {readonly property int durFast: 150readonly property int durNormal: 240readonly property int durSlow: 450- readonly property var spring: [0.34, 1.56, 0.64, 1.0]- readonly property var springSoft: [0.22, 1.25, 0.36, 1.0]- readonly property var easeOut: [0.2, 0.8, 0.2, 1.0]+ function linearEasing(stops) {+ var out = []+ for (var i = 1; i < stops.length; ++i) {+ var a = stops[i - 1], b = stops[i]+ out.push(a[0] + (b[0] - a[0]) / 3, a[1] + (b[1] - a[1]) / 3,+ a[0] + (b[0] - a[0]) * 2 / 3, a[1] + (b[1] - a[1]) * 2 / 3,+ b[0], b[1])+ }+ return out+ }+ // linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017 20.2%,1.043 24%,+ // 1.035 28.4%,.998 38.5%,.99 44.1%,1.001 60.7%,1)+ readonly property var spring: linearEasing([+ [0, 0], [0.0105, 0.009], [0.021, 0.035], [0.044, 0.141], [0.129, 0.723],+ [0.167, 0.938], [0.202, 1.017], [0.24, 1.043],+ [0.441, 0.99], [0.607, 1.001], [1, 1]])+ // linear(0,.02,.08 3.2%,.3 7.5%,.84 17%,1.01 25%,1.025 31%,1.004 45%,1)+ readonly property var springSoft: linearEasing([+ [0, 0], [0.016, 0.02], [0.032, 0.08], [0.075, 0.3], [0.17, 0.84],+ [0.25, 1.01], [0.31, 1.025], [0.45, 1.004], [1, 1]])+ // cubic-bezier(.2,.8,.2,1)+ readonly property var easeOut: [0.2, 0.8, 0.2, 1.0, 1.0, 1.0]// --- type (--f-ui / --f-mono and the .h1/.h2/.h3 scale) ---------------readonly property string fontUi: "Microsoft YaHei UI"diff --git a/tests/qml/QmlEasingTests.cpp b/tests/qml/QmlEasingTests.cppindex 909d9c48..5997e75e 100644--- a/tests/qml/QmlEasingTests.cpp+++ b/tests/qml/QmlEasingTests.cpp@@ -70,6 +70,12 @@ void compare(QQmlEngine& engine, const char* property, auto reference) {return;}const auto curve = anim->property("easing").value<QEasingCurve>();+ // Qt 6.8.3 corrupts the heap when a BezierSpline of 11+ segments is destroyed.+ const qsizetype segments = curve.toCubicSpline().size() / 3;+ if (segments > 10) {+ std::printf("FAIL %s: %lld segments, Qt 6.8.3 crashes above 10\n", property, (long long)segments);+ ++failures;+ }double worst = 0, at = 0;for (int i = 0; i <= 200; ++i) {const double t = i / 200.0;@@ -77,12 +83,13 @@ void compare(QQmlEngine& engine, const char* property, auto reference) {if (e > worst) { worst = e; at = t; }}const bool ok = worst <= 0.01;- std::printf("%s %s: type=%d max error %.4f at t=%.3f\n", ok ? "PASS" : "FAIL", property, int(curve.type()), worst, at);+ std::printf("%s %s: type=%d segments=%lld max error %.4f at t=%.3f\n", ok ? "PASS" : "FAIL", property, int(curve.type()), (long long)segments, worst, at);if (!ok) ++failures;}} // namespaceint main(int argc, char** argv) {+ std::setvbuf(stdout, nullptr, _IONBF, 0); // keep every line if the process diesqputenv("QT_QPA_PLATFORM", "offscreen");QGuiApplication app(argc, argv);QQmlEngine engine;diff --git a/tools/qt_probe/run-easing-tests.ps1 b/tools/qt_probe/run-easing-tests.ps1new file mode 100644index 00000000..8c0d294b--- /dev/null+++ b/tools/qt_probe/run-easing-tests.ps1@@ -0,0 +1,12 @@+# Runs veyra_qml_easing_tests (G0.6) with the Qt runtime on PATH for this process only.+param([string]$Build = 'E:\项目\Veyra\build\qt-probe-20260926',+ [string]$Qt = 'E:\项目\Veyra\deps\qt\6.8.3\msvc2022_64',+ [string]$Out = '')+$env:PATH = "$Qt\bin;$env:PATH"+$env:TEMP = 'E:\项目\Veyra\tmp\ui-qml-migration-20260925'; $env:TMP = $env:TEMP+$text = & (Join-Path $Build 'veyra_qml_easing_tests.exe') 2>&1 | Out-String+$code = $LASTEXITCODE+$text.TrimEnd()+if ($Out) { $text | Set-Content -LiteralPath $Out -Encoding utf8 }+"exit=$code"+exit $code