Hi Wei Chen,

1. The hardware composer *do not* help when you concern CPU usage, and basically *not always* introduce performance gain on Android if the device got a GPU with some external image related extensions.

Hardware composer is introduced to handle video/camera(YUV) content in early days(named overlay), and help some general content from Android ICS. It can offload some work from GPU to a dedicated hardware to help compositing.

Generally speaking, hardware composer only compose *some layers* and let remain layers go to GPU. That's why Android SurfaceFlinger ask hardware composer for which layers would be handled by it via hwc->prepare(), and examine some flag when doing OpenGL rendering.

2. You got wrong LayerManager. The LayerManager we used to compose layer is in CompositorParent.

? 2013/1/30 ?? 07:02, Wei Chen ??:
    I use "top -t" to show the performance when the browser was launched, and I found that 
the thread "Compositor" consumes too much CPU resource > 24%, even when page was loaded  
long time after,
    I try to enable hardware compositor in firefox OS using android hardware 
resource such as hwcompositor.xxx.so
    1. pref("layers.composer2d.enabled", true) let sUsingHwc=1 sUsingOMTC=1. 
but it dosn't work, and have side effect that the browser content cannot be shown, the 
page can only can be seen when switching to another website, it's strange.
and when DoDraw in nsWindows.cpp lm->GetBackendType return mozilla::layers::LAYERS_BASIC, I read some comments that if hardware compositor was enabled it should go mozilla::layers::LAYERS_OPENGL == lm->GetBackendType() path does it right? I checked the base GetBackendType function it just return LAYERS_BASIC
   firefox  now only support LAYERS_BASIC? it can support hardware compositor? 
or it need another patch?
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to