OSDN Git Service

Add GraphicBufferMapper::preloadHal
authorJesse Hall <jessehall@google.com>
Thu, 6 Jul 2017 21:02:29 +0000 (14:02 -0700)
committerJesse Hall <jessehall@google.com>
Thu, 6 Jul 2017 23:51:08 +0000 (16:51 -0700)
commit5dac7819ac9461c14f0b7c208597579c5c3fb814
treeb82bd75e987eb3c3d2ce1b20fcfdd52f36162af8
parent4265bd5d9b910c8954e006d0be968b5b45295c3b
Add GraphicBufferMapper::preloadHal

Plumbing to allow Zygote to explicitly preload the a.h.graphics.mapper
HAL. An earlier attempt did this implicitly with a static initializer in
libui.so, but the library is also used by non-Zygote processes that
don't have access to HALs. This way, the HIDL libraries and HAL are only
loaded in Zygote and its children, not random other processes.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I4989c8089e3a4cfd627f8940f5552950c1c617fc
libs/ui/Gralloc2.cpp
libs/ui/GraphicBufferMapper.cpp
libs/ui/include/ui/Gralloc2.h
libs/ui/include/ui/GraphicBufferMapper.h