At the previous post(Quick hack to run Android 2.3(Gingerbread) on KZM-A9-Dual board ), size of icons and fonts are smaller than expected. I investigated this and resolved.(Japanese version)
Different appearance, why?
Screen of froyo
Screen of gingerbread
At gingerbread on KZM-A9-Dual, size of icons and fonts are too small.
At Nexus One, upgrading from Froyo to Gingerbread does not cause this. I want to make KZM-A9-Dual the same appearance as Nexus One.
Comparing log output as Nexus One
At first, I thought gralloc in SurfaceFlinger is wrong, which get screen info from the frame buffer device driver of the kernel.With the following command you can save log of logcat to a file. Do this for both Nexus One and KZM-A9-Dual. And compare them.
$ adb logcat -d > logcat.txtSearching log for 'gralloc'
Log of Nexus One
I/SurfaceFlinger( 96): SurfaceFlinger is starting I/SurfaceFlinger( 96): SurfaceFlinger's main thread ready to run. Initializing graphics H/W... I/qsd8k.gralloc( 96): using (fd=24) I/qsd8k.gralloc( 96): id = msmfb I/qsd8k.gralloc( 96): xres = 480 px I/qsd8k.gralloc( 96): yres = 800 px I/qsd8k.gralloc( 96): xres_virtual = 480 px I/qsd8k.gralloc( 96): yres_virtual = 1600 px I/qsd8k.gralloc( 96): bpp = 32 I/qsd8k.gralloc( 96): r = 0:8 I/qsd8k.gralloc( 96): g = 8:8 I/qsd8k.gralloc( 96): b = 16:8 I/qsd8k.gralloc( 96): width = 48 mm (254.000000 dpi) I/qsd8k.gralloc( 96): height = 80 mm (254.000000 dpi) I/qsd8k.gralloc( 96): refresh rate = 60.00 Hz
Log of KZM-A9-Dual
I/SurfaceFlinger( 80): SurfaceFlinger is starting I/SurfaceFlinger( 80): SurfaceFlinger's main thread ready to run. Initializing graphics H/W... I/gralloc ( 80): using (fd=24) I/gralloc ( 80): id = EMXX FB I/gralloc ( 80): xres = 800 px I/gralloc ( 80): yres = 480 px I/gralloc ( 80): xres_virtual = 800 px I/gralloc ( 80): yres_virtual = 5184 px I/gralloc ( 80): bpp = 24 I/gralloc ( 80): r = 0:8 I/gralloc ( 80): g = 8:8 I/gralloc ( 80): b = 16:8 I/gralloc ( 80): width = 127 mm (160.000000 dpi) I/gralloc ( 80): height = 76 mm (160.421051 dpi) I/gralloc ( 80): refresh rate = 60.00 Hzthe value of yres_virtual, width, height and dpi is different.
As an experiment, I modified source file of gralloc to set (yres *2) to yres_virtual. Then redrawing screen becomes wrong, but size of icons and fonts are not changed.
Reverting yres_virtual, then I modifed width and height values and adjust to 254dpi, the same as Nexus One. But nothing changed. This part does not seem matter.
Comparing items of system property as Nexus One
Next, save items of system property to each files.$ adb shell getprop > prop.txtAnd compare them ... I found it.
The following item of system property exist in Nexus One, but not in KZM-A9-Dual.
[ro.sf.lcd_density]: [240]Searching source tree, I found this system property is referred at these files.
- frameworks/base/services/surfaceflinger/DisplayHardwareDisplayHardware.cpp
- frameworks/base/core/java/android/util/DisplayMetrics.java
At Nexus One's source tree, this system property is set at 'device/htc/passion/passion.mk'
I know I should make my own 'device' directory and do similar. I add this setting to 'default.prop' at root directory of the target.
/default.prop
ro.sf.lcd_density=240Boot again ... Good. The same appearance as Nexus One.
When I checked the KZM-A9-Dual implementation of Froyo, which is ported from Renesas Electronics's BSP, I found 'ro.sf.lcd_density = 240' at system.prop file.
One more thing ...
In gingerbread, GPU is more important for comfortable UI. But in this article 3D hardware acceleration library of KZM-A9-Dual is not yet enabled. User Experience is not good.You had better to set disable animation at screen transition.
At Settings application,
Display > Animation > No Animations
No comments:
Post a Comment