Hi All, Below is my understanding about how to enable the Overlay in a new hardware platform. Correct me if I am wrong.
1. Implement the stub funtions in hardware\libhardware\modules\overlay \overlay.cpp, this will generate a share library liboverlay.trout.so. 2. In SurfaceFlinger, it will create a DisplayHardware instance, and call DisplayHardware::init() which will create an overlay engine from liboverlay.trout.so. 3. When we want a OverlayRef from ISurface, we call ISurface::createOverlay() which will take use of the overlay engine creat in step 2. 4. Create a Overlay from OverlayRef as it in frameworks\base\libs \surfaceflinger\tests\overlays\overlays.cpp. sp<OverlayRef> ref = isurface->createOverlay(320, 240, PIXEL_FORMAT_RGB_565); sp<Overlay> overlay = new Overlay(ref); /* * here we can use the overlay API */ overlay_buffer_t buffer; overlay->dequeueBuffer(&buffer); printf("buffer = %p\n", buffer); void* address = overlay->getBufferAddress(buffer); printf("address = %p\n", address); overlay->queueBuffer(buffer); My questions are: a. In step 4, as we want paint something in the overlay, should we just put the image data to the buffer return by overlay->dequeueBuffer (), and call queueBuffer() to show the buffer? b. I dont see any update in android_surface_output to take use of overlay interface, will it be updated to use overlay interface if overlay is exit in the hardware? I suggest the surface output may try to create OverlayRef from surface interface, if it fail, surface output take the display mechanism as before(post buffer), otherwise it use this overlay to display video frame. Thanks Guoyin Chen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---