在11B Cosmos 平台,一些大分辨率LCD 配置,比如320x480, 480x800 下,手写笔画显示明显滞后,原因是大分辨率下LCD 刷新速度相对比较慢,所以手写采样率也要相应的降低。
[SOLUTION]
请参考以下两点修改:
1、static void vfxPenRegisterPenEvents()
{
VfxU32 samplingMsec = 1000 / vrt_sys_get_fps(VRT_SYS_DISPLAY_MAIN_LCD);
VfxU32 samplingPeriod = vfxMax(samplingMsec / 10, (VfxU32)1);
mmi_pen_config_sampling_period(
samplingPeriod,
4); //改为4或者5,不能超过5
2、该函数修改如下
static void vfxPenProcessStrokeInput(VfxPenEventTypeEnum eventType, const VfxPoint &pos) {
vfx_mmi_before_process_msg();
VfxPenDeviceInfo penStatus;
penStatus.timeStamp = VfxTimer::getCurrentSystemTime();
penStatus.pos = pos;
penStatus.eventType = eventType;
VfxPen *penSrv = VFX_OBJ_GET_INSTANCE(VfxPen);
VfxBool ret = penSrv->processStrokeInput(penStatus);
//addVRT
if(ret)
{
//Force commit if the pen event has been handled
VfxRenderer *renderer = VFX_OBJ_GET_INSTANCE(VfxRenderer);
renderer->mustShowNextFrame();
}
}
[SOLUTION]
请参考以下两点修改:
1、static void vfxPenRegisterPenEvents()
{
VfxU32 samplingMsec = 1000 / vrt_sys_get_fps(VRT_SYS_DISPLAY_MAIN_LCD);
VfxU32 samplingPeriod = vfxMax(samplingMsec / 10, (VfxU32)1);
mmi_pen_config_sampling_period(
samplingPeriod,
4); //改为4或者5,不能超过5
2、该函数修改如下
static void vfxPenProcessStrokeInput(VfxPenEventTypeEnum eventType, const VfxPoint &pos) {
vfx_mmi_before_process_msg();
VfxPenDeviceInfo penStatus;
penStatus.timeStamp = VfxTimer::getCurrentSystemTime();
penStatus.pos = pos;
penStatus.eventType = eventType;
VfxPen *penSrv = VFX_OBJ_GET_INSTANCE(VfxPen);
VfxBool ret = penSrv->processStrokeInput(penStatus);
//addVRT
if(ret)
{
//Force commit if the pen event has been handled
VfxRenderer *renderer = VFX_OBJ_GET_INSTANCE(VfxRenderer);
renderer->mustShowNextFrame();
}
}