|
发表于 2008-5-8 18:25:22
|
显示全部楼层
尝试一下方法:
1. 将matrix menu 背景图改成 PBM
1) 将 MAINLCD\MainMenu\MATRIX\MM_BG.GIF 改成 MM_BG.PBM
2) 修改 ThemeComponents.h 将
__MAINLCD__MAINMENU__MATRIX__MM_BG_BMP 改成
__MAINLCD__MAINMENU__MATRIX__MM_BG_PBM
3)修改 Res_MainMenu.c 中 MM_BG.BMP 的扩展名 BMP -> PBM
2. 将 matrix menu 背景图放在另一个layer
1)CustCoordinates.c
const U8 category14_matrix[]=
{
6,
DM_NEW_LAYER_START,
DM_IMAGE,
DM_BASE_LAYER_START,
DM_BASE_CONTROL_SET1,
DM_MATRIX_MENU1,
DM_BUTTON_BAR1
};
const s16 coordinate_set14_Matrix[]=
{
DM_FULL_SCREEN_COORDINATE_FLAG,
0,MMI_STATUS_BAR_HEIGHT+MMI_TITLEBAR_BUTTON_HEIGHT+4,176,158,DM_NO_FLAGS,//需要调整起始高度
DM_FULL_SCREEN_COORDINATE_FLAG,
DM_CONTENT_COORDINATE_FLAG,
DM_DEFAULT_BUTTON_BAR, DM_BUTTON_BAR_LEFT_ARROW|DM_BUTTON_BAR_RIGHT_ARROW|DM_BUTTON_BAR_UP_ARROW|DM_BUTTON_BAR_DOWN_ARROW,MMI_SOFTKEY_WIDTH
};
2)Themecomponents.h
#if 0
CONST_HARDWARE UI_filled_area mm_bkgrnd_1={
UI_FILLED_AREA_TYPE_BITMAP,
(UI_image_type)__MAINLCD__MAINMENU__MATRIX__MM_BG_GIF,
NULL,
{255,255,255,100},
{0,0,0,100},
{0,0,0,0},
{0,0,0,100},
0};
#else
CONST_HARDWARE UI_filled_area mm_bkgrnd_1={
UI_FILLED_AREA_TYPE_COLOR,
NULL,
NULL,
{0,0,255,100},
{0,0,0,100},
{0,0,0,0},
{0,0,0,100},
0};
#endif
3)wgui_categories_MM.c
void ShowCategory14Screen()
{...
case MATRIX_MENU:
associate_fixed_icontext_matrix();
...
SetKeyHandler(fixed_matrix_goto_next_item,KEY_VOL_DOWN,KEY_EVENT_DOWN);
dm_data.s32CatId = MMI_CATEGORY14_MATRIX_ID;
dm_add_image(get_image(IMG_MAIN_MENU_BG), NULL, NULL);
break;
...}
3. 关闭 list menu 的背景图
修改 ThemeComponents.h ,找 list_bkgrnd_1, list_bkgrnd_2, ... 如下:
把背景图拿掉,改成 UI_FILLED_AREA_TYPE_COLOR
CONST_HARDWARE UI_filled_area list_bkgrnd_1={
UI_FILLED_AREA_TYPE_COLOR,
UI_IMAGE_ID_NULL,
NULL,
{255,255,255,100},
{0,0,0,100},
{0,0,0,0},
{0,0,0,100},
0};
4. 对于无特效的highlight list,去掉一个delay
void redraw_fixed_list(void)
{...
#if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING))
if (wgui_fixed_list_menu_frame_counter > 0)
{
wgui_fixed_list_menu_frame_counter++;
gui_show_fixed_list_menu_no_draw(&MMI_fixed_list_menu);
}
else
{
wgui_fixed_list_menu_frame_counter = 1;
gui_show_fixed_list_menu_no_draw(&MMI_fixed_list_menu);
//gui_start_timer(UI_FRAME_START_TIMEOUT, wgui_fixed_list_menu_end_frame);
wgui_fixed_list_menu_end_frame();
}
#else /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING)) */
...}
5. 将 GIF decoder 核心放进剩余的 2K internal RAM
1)修改mcu\plutommi\MtkApp\GDI\GDISrc\gdi_image_gif.c (红色部分)
// color format 16 bit
#define GDI_IMAGE_GIF_CODEC_COLOR_FORMAT GDI_COLOR_FORMAT_16
#define GDI_IMAGE_GIF_DRAW_INTERNAL gdi_image_gif_draw_internal_from_mem_16
#define GDI_IMAGE_GIF_CODEC gdi_image_gif_draw_internal_from_mem_codec_16
//#define GDI_IMAGE_GIF_USING_INTERRAM
#include "gdi_image_gif_codec.h"
//#undef GDI_IMAGE_GIF_USING_INTERRAM
#undef GDI_IMAGE_GIF_CODEC
#undef GDI_IMAGE_GIF_CODEC_COLOR_FORMAT
#undef GDI_IMAGE_GIF_DRAW_INTERNAL
2)Build完,可以检查lis档,确定相关function是否有在internal SRAM
gdi_image_gif_hit_cache 0x40003114 Thumb Code 246 gdi_image_gif.obj(INTERNCODE)
gdi_image_gif_draw_mem_internal 0x40003210 Thumb Code 1088 gdi_image_gif.obj(INTERNCODE)
gdi_image_gif_draw_internal_from_mem_main 0x40003654 Thumb Code 1088 gdi_image_gif.obj(INTERNCODE)
3)使用如下的Scat file
…
INTSRAM 0x40000000 0x00008000
{
init_memory_stack.obj (INTERNCONST, INTERNRW, INTERNZI)
custom_emi.obj (INTERNCODE)
isrentry.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
stack_init.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
tcc.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
csc.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
tcd.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
tct.obj (+RO, +RW, +ZI)
divider.obj (+RO, +RW, +ZI)
l1d_data.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
m12170.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
m12160.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
midisyn.obj (INTERNCODE, INTERNCONST, INTERNRW, INTERNZI)
gdi_image_gif.obj (INTERNCODE, INTERNRW, INTERNZI)
gdi_mutex.obj (INTERNCODE, INTERNRW, INTERNZI)
}
… |
|