About Overlay interface

by pramod » Mon, 06 Apr 2009 06:34:11 GMT

Sponsored Links

I am implementing a custom MIO which makes use of Overlay interface.
my MIO calls the overlay ref  through the call "mSurface-

Currently i am facing problem in "mSurface->createOverlay", this is
not returning the OverlayRef. Due to this the next call to "new Overlay
(ref)" is failing.

layer,sp<OverlayRef>* overlayRef, uint32_t w, uint32_t h, int32_t
format)"  in LayerBuffer.cpp should return the Overlay ref object.

am i missing anything??? Is the overlay support fully implemented in
current Cupacake branch..?

Thanks in advance.


About Overlay interface

by waterblood » Tue, 07 Apr 2009 02:26:22 GMT

 It should be a overlay engine in surfaceflinger which means a you
should implment a overlay hardware HAL in hardware\libhardware\modules


Sponsored Links

About Overlay interface

by pramod » Tue, 07 Apr 2009 03:03:33 GMT

 hi ,

Thanks for responding, i have already implemented the overlay hardware
HAL in libhardware.
The overlay engine is created in the surfaceflinger,during
displayhardware init().
After putting some debug prints i found out that this overlay engine
is properly being used during the creation of the Overlay in
LayerBuffer::OverlaySource::OverlaySource. The OverlayRef is also
created and is retured properly.

But my problem is that i am not being able to access the OverlayRef
object in android_surface_output.cpp. The OverlayRef object is created
using the template class sp<>.

I have even included the libraries libutils, libcutils which might be
needed for usage of template class sp, and also the header file "utils/

Still i am not able to access the OverlayRef object.

Any help to solve the issue would be greatly appreciated.



About Overlay interface

by AJAY » Mon, 13 Apr 2009 10:58:42 GMT

 Hi Hanchao,

I am implementing a custom MIO which makes use of Overlay interface.I
have implemented my MIO calls "mSurface->createOverlay" to get
reference to the OverlayRef object.

The above createOverlay function is implemented in the ISurface.cpp.
The height ,weight, format information is passed using the parcel
object and the overlay is created succesfully. The created overlay is
passed back to the ISurface through the call
"OverlayRef::writeToParcel". But while reading the reply  parcel
through "OverlayRef::readFromParcel(reply)" call ,the OverlayRef
object is NULL.

Did you face similar issue when implementing overlay ?



Other Threads

1. Req. Apk Doc2Go..

Met pagi, saya butuh aplikasi doc2go nih... ada yg punya full version nya
gak? Yg di gms bayar usd 10... :(

Sent from my Nexus One

"Indonesian Android Community [id-android]" 

2. PopupWindow on activity start

I am trying to make a PopupWindow show straight away when an activity
has started.

when calling
public void showAtLocation (View parent, int gravity, int x, int y)

 I get the exception
 ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager
$BadTokenException: Unable to add window -- token null is not valid;
is your activity running?

At the moment I am calling from onCreate, but when calling from
onStart or onResume it still gives the same error.

The activity api says the activity is supposed to be running after
onResume is called. Where is the best place to load up the PopupWindow
if it needs to be done straight away?

At the moment It looks like Activity.onWindowFocusChanged() is the
best place.


3. SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji

4. LinearLayout Questions

5. android play youtube

6. problem with LocationManager

7. same property in PRODUCT_PACKAGE_OVERLAYS and system.prop