OSDN Git Service

Frequently used OpenGL ES methods whitelisted for fast JNI
authorDaniil Sokolov <dysokolo@intel.com>
Wed, 26 Aug 2015 19:39:36 +0000 (12:39 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Jul 2016 09:53:16 +0000 (17:53 +0800)
commit5d85d86b6e3d748f17f82f9e7248943c30d84f11
tree4b7cb7234f60bff50db23b311fd45d318c98a7ca
parentf1eaaec37ec7a8aa2987e0c707e4d7714ca72b0f
Frequently used OpenGL ES methods whitelisted for fast JNI
 path

The patch lists ~70 methods of OpenGL ES 2.0 wrapper as fast JNI.
This significantly reduces JNI overhead for OpenGL Java applications.
Which results in faster rendering and reduced JANK (e. g. 10 % Jank
reduction  on Google Maps).

None of the whitelisted methods can block forever according to OpenGL
spec. So, this change is safe from fastJNI point of view (can not
introduce any deadlocks). As measured is a separate experiemnt
the whitelisted methods take less than 1 ms in vast majority (99.9+) of the
cases, and always complete within 100 ms.  As shown in this thread
https://soco.intel.com/thread/766188 such level of delays should not
have any practical impact on GC pauses, but reduces the JNI overhead
significantly.

Category:aosp improvement
Domain:AOSP.ART-Other
Origin: internal
Upstream-Candidate: yes
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3965
Signed-off-by: DaniilSokolov <daniil.y.sokolov@intel.com>
Change-Id: I04ed94aef64686d6ee6a1b6a0ef62570687c5f5b
Reviewed-on: https://android.intel.com:443/405100
core/jni/android/opengl/util.cpp
core/jni/android_opengl_GLES20.cpp