From 0c35695be7511515e25c36eb857c7bbb7d65bdd8 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Sun, 7 Feb 2010 23:45:13 +0000 Subject: [PATCH] reduce message queue size in demo workbench. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@387 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- examples/gui/demo_view_animation.c | 7 +++---- examples/gui/demo_workbench.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/gui/demo_view_animation.c b/examples/gui/demo_view_animation.c index 93203a7608..ca2c892254 100644 --- a/examples/gui/demo_view_animation.c +++ b/examples/gui/demo_view_animation.c @@ -1,8 +1,7 @@ -#include "demo_view.h" -#include #include #include #include +#include "demo_view.h" /* * 直接在DC上绘图以实现动画效果 @@ -20,7 +19,7 @@ void timeout(struct rtgui_timer* timer, void* parameter) rtgui_rect_t rect; rtgui_widget_t *widget; - /**/ + /* 控件(view)通过parameter参数传递给定时器 */ widget = (rtgui_widget_t*)parameter; /* 获得控件所属的DC */ @@ -100,7 +99,7 @@ rtgui_view_t *demo_view_animation(rtgui_workbench_t* workbench) { rtgui_view_t *view; - view = demo_view(workbench, "DC animation"); + view = demo_view(workbench, "DC 动画"); if (view != RT_NULL) rtgui_widget_set_event_handler(RTGUI_WIDGET(view), animation_event_handler); diff --git a/examples/gui/demo_workbench.c b/examples/gui/demo_workbench.c index a8b9bfc0a9..2dc43176b7 100644 --- a/examples/gui/demo_workbench.c +++ b/examples/gui/demo_workbench.c @@ -38,7 +38,7 @@ static void workbench_entry(void* parameter) /* 鍒涘缓GUI搴旂敤闇瑕佺殑娑堟伅闃熷垪 */ #ifdef RTGUI_USING_SMALL_SIZE - mq = rt_mq_create("workbench", 64, 8, RT_IPC_FLAG_FIFO); + mq = rt_mq_create("workbench", 32, 8, RT_IPC_FLAG_FIFO); #else mq = rt_mq_create("workbench", 256, 8, RT_IPC_FLAG_FIFO); #endif