Do you mean multi screen or multi-display layers.
I have invesgate  the multi-display layers.

I think the 2nd display layer is simple , so it needn't use the
DisplayHardware.

When SurfaceComposerClient::createSurface  , it will get a "Surface".
So we can only add a Surface for it (the implment is the ISurface)


SurfaceComposerClient::createSurface       (ISurface → Suface,
frameworks/base/libs/ui/SurfaceComposerClient.cpp)
→ (IsurfaceFlingerClient:: createSurface)
→  Bclient::createSurface                  (framework/base/libs/
surfaceflinger/SurfaceFlinger.cpp)
→  SurfaceFlinger::createSurface           (framework/base/libs/
surfaceflinger/SurfaceFlinger.cpp)
LayerBaseClient* layer = 0;
sp<LayerBaseClient::Surface> surfaceHandle;
        eFXSurfaceNormal → Layer or LayerBuffer
        eFXSurfaceBlur → LayerBlur
        eFXSurfaceDim → LayerDim
surfaceHandle = layer->getSurface();

In SufaceFlinger, there are many different "LayerBaseClient" ,such as
Layer,LayerBuffer,LayerDim and LayerBlur.
Add such class , can use the second fb !
The emun type is in frameworks/base/include/ui/ISurfaceComposer.h.


On Jan 16, 7:19 am, dan <[email protected]> wrote:
> I need to change the video hardware in an android system on the fly
> and I need the system, and any running applications, to recognize any
> change in video size, format and buffers. I have been browsing the
> source for the SurfaceFlinger, Clinet, Layer, DisplayHardware and
> EGLDisplaySurface classes, but have been unable to figure out how to
> do this. Can anyone give me a hint?
>
> I created a second frame buffer driver in the kernel mapped to /dev/
> graphics/fb1
>
> I modified DisplayHardware and EGLDisplaySurface so that
> EGLDisplaySurface uses a frame buffer based on the screen index that
> SurfaceFlinger passes to DisplayHardware (i.e. if DisplayHardware is
> passed 0 for the dpy parameter of its constructor then
> EGLDisplaySurface will use fb0). I created a second GraphicPlane in
> SurfaceFlinger using a second DisplayHardware object mapped to fb1
> through EGLDisplaySurface .
>
> I added a command to SurfaceFlinger's onTransact method to implement
> the switch.
>
> When the command to switch comes in I initialize the second display if
> it has not been initialized before. Then I enumerate the existing
> Layer objects calling each of their setSizeChanged and doTransaction
> methods. I then call DisplayHardware's makeCurrent method for the new
> display.
>
> Am I headed down the wrong path here or am I just missing a step (or
> two, or ...)?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to