Transplantation of mprc Android 2.1
Android 2.1 pop-up Screen
During the porting process, the small kernel does not support double framebuffer, which causes the screen to be constantly flushed. Finally, we use the following methods:
Http://hi.baidu.com/aokikyon/blog/item/609ea74530b8f533879473be.html
Screen flushing will be much better, but the screen will still flash when you open the program.
Later, a newly defined macro, board_no_page_flipping, was found in hardware/libhardware/modules/gralloc/Android. mk of gingerbread.
Include $ (clear_vars) <br/> 21 local_prelink_module: = false <br/> 22 local_module_path: = $ (target_out_shared_libraries)/HW <br/> 23 local_shared_libraries: = liblog libcutils <br/> 24 <br/> 25 local_src_files: =/<br/> 26 gralloc. CPP/<br/> 27 framebuffer. CPP/<br/> 28 mapper. CPP <br/> 29 <br/> 30 local_module: = gralloc. default <br/> 31 local_cflags: =-dlog_tag =/"gralloc/" <br/> 32 ifeq ($ (board_no_page_flipping), true) <br/> 33 local_cflags + =-dno_page_flipping <br/> 34 endif <br/> 35 <br/> 36 include $ (build_shared_library)
Then go to the macro call in the source code, in framebuffer. cpp:
// Numbers of buffers for page flipping <br/> 46 # If defined (no_page_flipping) <br/> 47 // page-flipping is buggy on some devices <br/> 48 # define num_buffers 1 <br/> 49 # else <br/> 50 # define num_buffers 2 <br/> 51 # endif
In the original version 2.3, single framebuffer is better supported, and page flipping is not used.
In the end, I didn't make any changes to the Code of 2.1. I directly put the gralloc code of gingerbread into the source code of 2.1 for compilation.
Yes, no problem.
Then place the generated gralloc. Default. So to the small version. Sure enough, the flash screen is completely gone.
If you have time to study the specific improvements made by gingerbread.