Alternative to surfaceview

354 views
Skip to first unread message

amit jain

unread,
May 17, 2013, 1:49:13 AM5/17/13
to chromi...@chromium.org
Dear All,
 
In ContentViewRenderView.java surfaceView is being used.

class ContentViewRenderView extends FrameLayout{

private int mNativeContentViewRenderView = 0;

private SurfaceView mSurfaceView;

 
SurfaceView consumes large power and a drain on battery. In some normal single activity apps takeSurface() method is useful but
in chromium if I try content view seems to be taking owner ship of entire window so my address bar etc are not visible any more.
 
Does any one have idea about how to get rid of surface view so that other app parts are not affected.
 
TIA
Amit
 
 
 
 

Alexandre Elias

unread,
May 21, 2013, 12:22:06 AM5/21/13
to amitsing...@gmail.com, Chromium-dev, graphics-dev
Chromium for Android's rendering model is to issue OpenGL ES on a native side thread.  So if you want to mix it with Java Views, the only options are SurfaceView or TextureView.

I don't believe SurfaceView is a significant power drain on devices that allocate a hardware overlay for it.  Are you targeting a device unable to do so?  You can check using 'adb shell dumpsys SurfaceFlinger'.

--
Alex


 
 
 
 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 
 

Amit Jain

unread,
May 23, 2013, 12:20:38 AM5/23/13
to Alexandre Elias, Chromium-dev, graphics-dev
Removal of surface view and using takeSurface() instead actually works provided the other view is added via windowManager.
I had to tweak with window manager layout parameters.
I tried the dumpsys surfaceflinger , but could not interpret the output :-)
 
 
 
Reply all
Reply to author
Forward
0 new messages