top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Hardware Accelerated Path Drawing in android

0 votes
253 views

I am interested in knowing how does Android handle path drawing using hardware acceleration considering the fact that OpenGL does not have path as a primitive.
I am stuck at native_drawPath which in turn calls a draw function whose implementation I cannot find. Can anyone help ?

posted Jun 28, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Some convex shapes (circles, ovals, rounded rects, etc.) are rendered by tesselating the path. That's also how simple strokes are handled.

If a path is too complex the hardware renderer falls back to software. The path is drawn into a bitmap that is the uploaded to a GL texture and rendered on screen using a simple quad.

The native_drawPath function you mention is not used by hardware acceleration. Its used by the software renderer.

answer Jun 29, 2013 by anonymous
Similar Questions
+5 votes

Can someone give a hint on how can I simulate accelerometer in Android? There should be acceleration and rotation events, would be good to know how to send actual events to it.

+1 vote

I working on a project which needs adding a service with JNI to the system server and also a new daemon in init.rc script. I have successfully done this.
I might need the system service to periodically send SIGUSR1/2 signals to the daemon. Linux requires a sender of signals to be root. Do I have this privilege inside system server in Android?

0 votes

I need to show a dialog (more like a horizontal bar) on press of a custom Key (on my custom device powered by Android). This dialog should appear on top of any other application(say "A") that might be running when the Key is pressed.
The app "A" should keep on running and its UI should be visible (i.e the app "A: should not go to "_onPause_()"). It should work something similar to_ SystemUI_'s volume change dialog when Volume Hard Keys are pressed. I want to make minimum changes in framework.
My understanding is that I need to make changes in _PhoneWindowManager.java_ to handle the press of custom Key, which will then call my app residing in application layer, which will just inflate the dialog.
Would this work? If so, is there a better way to implement it? If not, how can I implement this?

+3 votes

I designed a new file system and mounted it to a self created folder at /sdcard/mytest/. Now I want to check the Android Apps performance on this new file system.So I need to install some apk file to this folder, /sdcard/mytest/, not /sdcard/

Is there any way to install the apk using some command lines and designate the installation location?

0 votes

Can anyone suggest the library for Push Notification?

...