Professional Documents
Culture Documents
Snapdragon™ Web Engine Overview: Confidential and Proprietary - Qualcomm Technologies, Inc
Snapdragon™ Web Engine Overview: Confidential and Proprietary - Qualcomm Technologies, Inc
Snapdragon™ Web Engine Overview: Confidential and Proprietary - Qualcomm Technologies, Inc
80-NN732-1 A
PAGE 2 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Revision History
PAGE 3 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Contents
SWE Introduction
Getting SWE Code, Binaries, and Patches
High-level Understanding of Code/Projects and Building
OEM Side Enhancement/Migration/Integration Guide
Debugging and Triaging SWE Issue
Additional Information
References
Questions?
PAGE 4 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Introduction
PAGE 5 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE and its Motivation
What is SWE?
SWE is Snapdragon™ Web Engine based on Chromium for Android™. For
details, refer to [R1].
Motivation
The objective of this version of Chromium Browser Project is to provide an
optimized environment for web developers and embedders targeting Qualcomm
Technologies, Inc.’s (QTI) Snapdragon processors.
SWE is a non-system WebView based on Chromium. It is intended to fulfill the
needs of a fully-featured browser.
PAGE 6 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Architecture
PAGE 7 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Baseline Content Shell
PAGE 8 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Content Shell
PAGE 9 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Android Browser
Chrome Repo
PAGE 10 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Branches
Note: Android version refers to Android releases for which QTI will provide support for SWE Android
browser for that particular SWE branch.
PAGE 11 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
GCC vs LLVM
PAGE 12 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
GCC vs LLVM (cont.)
Ninja vs Make
Controlled by defining GYP_GENERATORS as Ninja or Make on the gclient
runhooks line.
GYP_GENERATORS=ninja gclient runhooks -v
LLVM vs GCC
Controlled by adding clang=1 or clang=0 to GYP_DEFINES on the gclient
runhooks line.
GYP_DEFINES="$GYP_DEFINES clang=1" gclient runhooks –v
Clang = 1 → LLVM
Clang = 0 → GCC
PAGE 13 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE vs Chromium Based Webview KitKat Onwards
PAGE 14 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Licenses
The source code available for download from Code Aurora may be
covered by one or more different licenses. The files in Code Aurora may
contain changes and additions on top of the code from the original source.
These changes and additions are covered under the same license as the
original source. In many cases, the license is explicitly listed at the
beginning of the file. A list of licenses is included for reference purposes
only.
GPLv2
BSD
Apache 2.0
PAGE 15 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Getting SWE Code, Binaries, and
Patches
PAGE 16 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Deliverables
PAGE 17 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Getting SWE Open Source Code
PAGE 18 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Getting SWE Open Source Code (cont.)
Pre-requisites
1. Install git with normal configurations.
2. Fetch depot_tools.
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
The above command gets a copy of the depot_tools directory in the directory from where
the command was fired.
3. Add depot_tools to your PATH variable.
$ export PATH="$PATH":<pwd>/depot_tools
For details, refer to [R3].
PAGE 19 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Getting SWE Open Source Code (cont.)
Syncing Code:
1. Update .gclient file in your workspace with appropriate solution content for
sync. Example for 1700 branch, .gclient content should be:
solutions = [
{ "name" : "src",
"url" :
"git://codeaurora.org/quic/chrome4sdp/chromium/src.git@refs/
remotes/origin/1700",
"deps_file" : ".DEPS.git",
"managed" : True,
"safesync_url": "",
},
]
target_os = ["android"]
2. Get the code. Give following command from root of your workspace:
<WorkspaceRoot>$ gclient sync -n --no-nag-max
<WorkspaceRoot>$ cd src
<WorkspaceRoot/src>$ . build/android/envsetup.sh
<WorkspaceRoot/src>$ GYP_GENERATORS=ninja gclient runhooks
Note: The above .gclient is for SWE 1700. For details on other branches, refer to [R4].
PAGE 20 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Choosing Between LLVM and GCC Versions
PAGE 21 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Receiving Proprietary Binaries
The proprietary binaries are synced to SWE workspace. While syncing the
entire SWE code from Code Aurora, there may be a need to use a
different/updated binary at the OEM end under the following (but not
limited to) circumstances:
A new binary with a fix for a OEM reported issue.
OEM’s decision to integrate only a SWE proprietary binaries (say only v8) on
their own Chromium based browser.
In order to sync only these proprietary binaries, OEMs need to perform the
following steps:
1. Clone the git repository (corresponding to the binary) from the webtech-
devx.qualcomm.com servers. (Refer to slide 23 for the complete repository
path)
2. Checkout a particular hash. Please contact QTI's WebTech Customer
Engineering team to know the exact/latest/applicable hash ID through a
Salesforce case.
PAGE 22 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Receiving Proprietary Binaries (cont.)
libswev8.so http://webtech-devx.qualcomm.com/swe/packages/v8.git
https://webtech-devx.qualcomm.com/swe/packages/skia/include.git
libsweskia.so
https://webtech-devx.qualcomm.com/swe/packages/skia/src.git
Fast_webview_java.jar* https://webtech-devx.qualcomm.com/swe/packages/fast-webview.git
PAGE 23 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Locating SWE CAF Patches
1. Access the following link for SWE projects git repositories at Code
Aurora:
https://www.codeaurora.org/cgit/quic/chrome4sdp/
2. From the projects list, choose a project of interest (e.g., chromium/blink).
This opens the summary page for the project:
https://www.codeaurora.org/cgit/quic/chrome4sdp/chromium/blink/
3. Choose a branch of interest (e.g., branch 1700). This opens the log for
the project for that particular branch:
https://www.codeaurora.org/cgit/quic/chrome4sdp/chromium/blink/log/?h=1700
PAGE 24 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Patch Documents (w.r.t. Major Features Added in SWE)
PAGE 25 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
High-level Understanding of
Code/Projects and Building
PAGE 26 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
SWE Sync and Build System (gclient, gyp, etc.)
PAGE 28 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
List of Binaries Used in SWE
Apart from the open source performance optimization changes that are
delivered as patches at chrome4sdp (Chromium for Snapdragon) project
on Code Aurora, several optimizations are released to OEMs as
proprietary libraries. Following table lists these libraries:
Name Description Workspace directory
These libraries are packaged within SWE APKs and are installed on the
device similar to any other third party APKs with libraries.
PAGE 29 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
List of Key Enhancements in SWE
PAGE 30 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
List of Key Enhancements in SWE (cont.)
SKIA optimizations
Neonizing few filters and blitting routines
Improve vectorization and parallelization
Cache compiler option to optimize cache-line-size
HTML5/Parallel canvas patches
Improve rendering of canvas content
FPS improvement
WebGL implementation patches
Enable WebGL
(Note: WebGL is not enabled on Android KitKat WebView)
WebGL content performance Improvement
PAGE 31 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
List of Key Enhancements in SWE (cont.)
Rendering optimizations
Improvement of key routines responsible for page rendering
Support for new features (e.g., enabling deadline scheduling,
capturePictureAsync, etc.)
Video optimizations
HTTP network stack optimization patches
Speeding up page download
Reduce latency in resource fetching on slower link through early connection
Object pre-fetch
Suppression of HTTP headers for uplink traffic reduction
Warm up the modem
Power consumption optimization through intelligent management of TCP
messages
Miscellaneous patches
WAP support to meet regional OEM requirements
OMA download
PAGE 32 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Building SWE With Default V8
1. After the SWE code is synced (Refer to slides 18 to 20 for details), SWE
can be built to generate either “Content Shell” or “SWE Android
Browser”:
<WorkspaceRoot/src>$ ninja -C out/Release content_shell_apk
<WorkspaceRoot/src>$ ninja -C out/Debug content_shell_apk
<WorkspaceRoot/src>$ ninja -C out/Release swe_android_browser_apk
<WorkspaceRoot/src>$ ninja -C out/Debug swe_android_browser_apk
2. This will generate APK at
<WorkspaceRoot/src/out/<Release/Debug>/apks/
PAGE 33 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Building SWE with a Specific V8 Version
PAGE 34 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Building SWE with Other than Default Proprietary Libraries
PAGE 35 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Disabling/Enabling Features Through Switches
PAGE 36 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Disabling/Enabling Features Through Switches (cont.)
PAGE 37 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Disabling/Enabling Features Through Switches (cont.)
PAGE 38 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Knowing Expected Benchmarks for a Project
PAGE 39 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
OEM Side
Enhancement/Migration/Integration
Guide
PAGE 40 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Low-end Memory Devices Customization/Good Practices
PAGE 41 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Impact on Webapp Developers
Presence of SWE Android browser APK on the device will not affect the
behavior of a third partly webapp by default, i.e., the webapp behavior will
be per the implementation and the features as exposed by Google’s
Android through android.webkit.WebView.
In KitKat, the default WebView (android.webkit.WebView), as released
with Google’s Android source code is also based on chromium.org. The
default WebView on earlier releases (i.e., till Android 4.3) was based on
webkit.org. Google has released a migration guide on how this change is
going to impact webapp developers at:
http://developer.android.com/guide/webapps/migrating.html
OEMs are recommended to follow the migration guide and contact Google
directly for any functional, performance, or stability issues reported on
third party web applications.
PAGE 42 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Browser Application Level Customization
PAGE 43 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Problem Areas for SWE Cases on Salesforce
For any SWE issues, OEMs must raise a Salesforce case with the
following problem areas to ensure that the cases get routed to the correct
SWE CE PoC:[1]
Other values for “Problem Area 3” is going to be used for issues on legacy
WebView (android.webkit.WebView on 4.3 or less).
[1] In future, given the WebTech team’s main focus is on SWE, QTI is planning to reorganize Problem Area 3 as:
• Webcore
• V8
• Rendering
• Network stack
• Performance
• Power
• Memory optimization
• SKIA
• Browser UI
• Legacy browser
• Other
With this change, all the PA3 fields except for “Legacy Browser” will be for SWE project. “Legacy Browser” can be used for Android’s (all versions) WebView
queries.
PAGE 44 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Debugging and Triaging SWE Issue
PAGE 45 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Information Required from OEMs
PAGE 46 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Basic Triage Overview
PAGE 47 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Basic Triage Overview (cont.)
PAGE 48 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Narrowing the Source of Problem (Feature-Wise)
PAGE 49 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Collecting Black Box for libswev8.so Crash
Points to note:
The procedure may not work on a non-rooted device as it may not be possible
to create a directory at this location.
OEMs are requested to give the following information while reporting a V8
crash:
Black box
Tombstone crash call stack (matching the pid of the blackbox dump)
Main logcat preceding the crash
V8 library information (OEM can simply share the libswev8.so over the case)
PAGE 51 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Additional Information
PAGE 52 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Chrome Browser vs Chrome Beta Versions
PAGE 53 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Getting Chrome Version
PAGE 54 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Chromium Development Calendar and Release Information
Chrome release plan for 2014 is given below. For details refer to [R10].
Release Week of Branch Point (Monday of the week)
33 Dec 16th, 2013/ Jan 6th, 2014 (TBD)
34 Feb 17th, 2014
35 Mar 31st, 2014
36 May 12th, 2014
37 Jun 23rd, 2014
38 Aug 18th, 2014
39 Sep 29th, 2014
40 Nov 10th, 2014
PAGE 55 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
References
Ref. Document
Qualcomm Technologies
Q1 Application Note: Software Glossary for Customers CL93-V3077-1
Resources
R1 http://www.chromium.org/Home
R2 https://www.codeaurora.org/xwiki/bin/Chromium+for+Snapdragon/
R3 http://dev.chromium.org/developers/how-tos/install-depot-tools
R4 https://www.codeaurora.org/xwiki/bin/Chromium+for+Snapdragon/Build
R5 http://dev.chromium.org/developers/how-tos/depottools
R6 https://code.google.com/p/gyp/wiki/GypLanguageSpecification
R7 https://code.google.com/p/gyp/wiki/GypUserDocumentation
R8 http://peter.sh/examples/?/chromium-switches.html
R9 http://www.chromium.org/developers/how-tos/run-chromium-with-flags
R10 http://www.chromium.org/developers/calendar
R11 http://omahaproxy.appspot.com/
PAGE 56 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
References (cont.)
Ref. Document
Resources
R12 http://www.chromium.org/developers/design-documents/multi-process-architecture
R13 http://www.chromium.org/developers/design-documents/displaying-a-web-page-in-chrome
R14 http://www.chromium.org/developers/design-documents/inter-process-communication
R15 http://www.chromium.org/developers/design-documents/threading
R16 http://www.chromium.org/developers/how-tos/getting-around-the-chrome-source-code
R17 http://www.chromium.org/developers/code-reading/how-html5-s-filereader-works
R18 http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome
R19 http://www.chromium.org/blink
R20 https://docs.google.com/document/d/1UkxPz9GDQXLBZcbw5OeUQpk1VIq_BKhm6BGvWJ5mKdU/edit
R21 http://www.chromium.org/developers
PAGE 57 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Questions?
https://support.cdmatech.com
PAGE 58 80-NN732-1 A May 2014 Confidential and Proprietary – Qualcomm Technologies, Inc. | MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION