OSDN Git Service

libhwui: make setSurface asynchronous
authorThomas Buhot <thomas.buhot@intel.com>
Thu, 24 Sep 2015 08:38:07 +0000 (10:38 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Jul 2016 09:53:17 +0000 (17:53 +0800)
commita7524d1de5049c1c39662217f2720a928441ec82
tree6ac22e6762fd7206c652c64b640c93e0c25c00f9
parent3af66d083f55e6e9a4cceff1882e2551dc6955b4
libhwui: make setSurface asynchronous

On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.

With this optimization the launch time of the settings
application is reduced by 20 ms to 40 ms.

This optimization applies to the launch of all
applications.

Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3601
FeatureID: https://jira01.devtools.intel.com/browse/AREQ-13987
Reviewed-on: https://android.intel.com:443/420515
libs/hwui/renderthread/CanvasContext.h
libs/hwui/renderthread/RenderProxy.cpp