is the hardware rendering for android webview shell

291 views
Skip to first unread message

Xiaofeng

unread,
Mar 3, 2016, 10:08:04 PM3/3/16
to Chromium-dev
Hi

I see this topicIs it possible to enable hardware rendering for android webview shell and some information here

Build WebView shell

.....The WebView shell is a view with a URL bar at the top (see code) and is independent of the WebView implementation in the Android system (the WebView shell is essentially a standalone unbundled app). As drawback, the shell runs in software rendering mode only.

However, from the git log in AwTestContainerView.java:

commit 386f9301889efde34b202a4600496b1e10aa06c8
Author: sievers <sie...@chromium.org>
Date:   Fri Aug 29 16:32:28 2014 -0700

    android: Use hw acceleration in android_webview_shell
    
    This creates a (GL)SurfaceView overlay on top of the shell
    container view which runs its own thread for rendering.
    It calls into the native draw functor through a small
    dynamic library (drawgl.so).

If the Android WebView Shell has been changed to HW rendering mode, the build guide  here also need to be updated to avoid the confusion.

Bo Liu

unread,
Mar 4, 2016, 1:28:52 AM3/4/16
to xiaofen...@intel.com, Chromium-dev
The webview instrumentation test shell does run in hardware mode now, after that CL from sievers you found. It uses a SurfaceView to fake the private android rendering APIs, so two caveats:
* It's different from how webview renderings in production, and is only used in tests to exercise hardware rendering code path.
* Only the first webview created in the shell is hardware accelerated. This really only applies to tests, since there is no UI to create more than one webview in the shell.

I've updated the wiki page to say "non-production" instead of "software".

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

陈志远

unread,
Jun 30, 2016, 2:48:35 AM6/30/16
to Chromium-dev, xiaofen...@intel.com, bo...@chromium.org
Dear Bo Liu,
     I need to wrap a custom webview into my own app,could you give me some suggestions how could I do with Android WebView Shell?

在 2016年3月4日星期五 UTC+8下午2:28:52,Bo Liu写道:

Bo Liu

unread,
Jun 30, 2016, 2:06:53 PM6/30/16
to 陈志远, Chromium-dev, xiaofen...@intel.com
On Wed, Jun 29, 2016 at 11:48 PM, 陈志远 <czy779...@gmail.com> wrote:
Dear Bo Liu,
     I need to wrap a custom webview into my own app,could you give me some suggestions how could I do with Android WebView Shell?

Build android_webview_apk from chrome. Then start looking at AwContents the majority of methods from webview.

Also a word of warning that there are few legitimate reasons to build a custom webview into your app.

陈志远

unread,
Jun 30, 2016, 11:02:29 PM6/30/16
to Chromium-dev
Thank you  for your reply,
but what do you mean to say "there are few legitimate reasons"?
And could you tell me some more steps what I can do from android_webview_shell?

---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Bo Liu

unread,
Jul 6, 2016, 4:33:06 PM7/6/16
to 陈志远, Chromium-dev
On Thu, Jun 30, 2016 at 8:01 PM, 陈志远 <czy779...@gmail.com> wrote:
Thank you  for your reply,
but what do you mean to say "there are few legitimate reasons"?

Webview is part of the system. Apps that want to bundle its own webview or web engine generally want more control/consistency, but they ignore other down sides like security, fragmentation, memory/disk usage, etc.
 
And could you tell me some more steps what I can do from android_webview_shell?

Follow those instructions, but build android_webview_apk instead of chrome_public_apk
Reply all
Reply to author
Forward
0 new messages