mt2503 11B Cosmos平台手写笔画显示比较滞后问题
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
在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);
//add,通知VRT 下一帧立即刷新
if(ret)
{
//Force commit if the pen event has been handled
VfxRenderer *renderer = VFX_OBJ_GET_INSTANCE(VfxRenderer);
renderer->mustShowNextFrame();
}
}
在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);
//add,通知VRT 下一帧立即刷新
if(ret)
{
//Force commit if the pen event has been handled
VfxRenderer *renderer = VFX_OBJ_GET_INSTANCE(VfxRenderer);
renderer->mustShowNextFrame();
}
}
谢谢小编分享调试经验
顶一顶
都是MTK的,MTK知道吗
