把宽缓冲区推广为基底复用:拖弱波增强参数滑块降为 O(1)(55ms 到 5ms)
抽出 PaintLaneDerivedOverlays;宽缓冲只存基底(网格/波形/时间轴,跳过派生曲线与图例/Y轴刻度);基底校验键改为 SceneContentHash(true,false)(含外观样式、排除派生参数),因此拖弱波增强等级/迭代滑块不会让基底失效,可复用基底像素 + 只重画派生曲线叠加层。判定为结构未变且外观样式未变(仅视图或派生参数变化)时启用;外观样式变化仍走样式补丁。 实测 VERY_BIG_DATA 全信号、视界 [40.1756,40.1885]s、5 网格:弱波增强滑块 55ms 到 5.2ms,平移 1.3ms、透明度/粗细/颜色 8ms 不变;静止/结算帧与 HEAD 逐像素 0 差异(LockBits)。
This commit is contained in:
1 parent
fa0d62b016
commit
b04167a9d6
3 files changed
+126
-71
No files matched your search
@@ -1076,6 +1076,18 @@ namespace jdi
|
||||
void PaintLane(gd::Graphics& g, int laneIndex, const LaneVisual& lane,
|
||||
const std::vector<double>& timeTicks);
|
||||
|
||||
/**
|
||||
* @brief 绘制某网格的全部**派生预览曲线**(均值滤波 / 中心轴 / 弱波增强),叠加在原信号之上。
|
||||
*
|
||||
* 从 `PaintLane` 抽出,供「宽缓冲区」前台路径复用:宽缓冲只存"基底"(网格/波形),
|
||||
* 派生曲线每帧作为叠加层单独绘制,因此拖派生参数滑块时无需重画波形。
|
||||
*
|
||||
* @param [IN,OUT] g 绘图上下文。
|
||||
* @param [IN] laneIndex 网格下标。
|
||||
* @param [IN] lane 网格绘制信息。
|
||||
*/
|
||||
void PaintLaneDerivedOverlays(gd::Graphics& g, int laneIndex, const LaneVisual& lane) const;
|
||||
|
||||
/**
|
||||
* @brief 绘制底部时间轴。
|
||||
* @param [IN,OUT] g 绘图上下文。
|
||||
@@ -1933,6 +1945,13 @@ namespace jdi
|
||||
float opacity = 1.0f; /**< 不透明度。 */
|
||||
float lineWidth = 1.0f; /**< 线宽。 */
|
||||
int mode = 0; /**< 绘制模式。 */
|
||||
|
||||
/** @brief 相等比较(用于判断"逐信号外观样式是否变化")。 */
|
||||
bool operator==(const SceneStyleEntry& other) const
|
||||
{
|
||||
return color == other.color && opacity == other.opacity &&
|
||||
lineWidth == other.lineWidth && mode == other.mode;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user