Sunday, August 29, 2010

transparency

mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);

mGLSurfaceView.setZOrderOnTop(true);

useful to show required background

A potential action

create an android
that has single activity ( only web service )
gl based views ( not canvas based views )
gl over hw (not gl over pixel flinger )
android-linux kernel
call it webdroid

Find the webkit dependencies
1.skia
2..

cont..

1.commons of 2d-3d all uses surface
2.difference 2d uses canvas over surface,3d uses glcontext over surface
3.z ordering of layers which is near to screen .... not surfaces
4.stack based implementation get the appropriate layer using push restore ...not surface
5.EGL has some query interface, activity tells the requirement, EGL selects the appropriate channel ......based on parameters .... but canvas drawing and gldrawing are entirely different
6.the view hierarchy helps to localize the area where either canvas or gldrawing is applied
7.Layout inflator is used only for xml
8.ViewRoot
9.

Android graphics cont

1.It all starts at activity
2.A view hierarchy is created here
3.in order to get sequence start tracing from setcontentview/addcontentview
4.addcontentview works on R.Layout.main
5.see how the view hierarchy is established starting the trace from setcontentview
6.the activity creates a windowssession with window_service and creates a viewroot to link the viewhierarchy,activity,window_service
7.A call to window_service creates the window and "surface"
8.A canvas is associated with the surface to draw into
9.Basic menu operations are done on a single canvas
10.surfaceview and glsurfaceview creates new surfaces
11.EGL is kind of Graphics control layer
12.Every activity gets a EGL context
13.EGL context, has reference to opengl api lib, hw channel and display
14.The activity has the freedom to choose (api lib,hw,display) for a EGL context
15.currently its (opengles lib,pixelflinger,display 0),(opengleslib,graphics hw,display 0) ... options in different androids
16.also for 2d its (skia lib,framebuff,display0)

Sunday, August 8, 2010

Android - telephony

1.java --- dialer and java packages (gsm,cdma)
2.c,c++ --- rild
3.c,c++ --- vendor-ril.so
4.kernel --- vendor driver ( serial, ethernet )

normally baseband contains the mic,speaker redirector and the protocol
vendor-ril can send commands to modify the behaviour

Android - graphics

1. 2d renderer is using skia , its purely software
2. 3d renderer is using pixel flinger, this is software. see libagl.so
3. Hw 3d renderer , see libhgl.so

Android - user mode

contains
1.java layer
2.native layer - c,c++

under java
1.activities,services,receivers,providers

under native
1.daemons

communication between them
1.activities,services, .., and .. uses binder to communicate
2.a,s,.,. communicate with native layer using binders

but jni is also used in cases where the java can call on c,c++
also domain sockets can be used for communication

binder is a mechanism where a,s,r,p communicate with each other using ioctls and
binder driver

complication because, binder will invoke arbitraty threads from a pool to accomplish a task.In addition to arbitrary threads there is also main thread