Merge "graphics: improve preloading for IMapper default impl" am: 960c33c599
am: 697fddee77
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2459229 Change-Id: Ic2e20f6e616a121a43053fd935e79bce26d7b538 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
227a9f4155
2 changed files with 16 additions and 0 deletions
|
@ -19,6 +19,14 @@
|
|||
using android::hardware::graphics::mapper::V2_0::IMapper;
|
||||
using android::hardware::graphics::mapper::V2_0::passthrough::GrallocLoader;
|
||||
|
||||
// Preload the gralloc module such that GraphicBufferMapper::preloadHal is
|
||||
// meaningful
|
||||
class GrallocPreloader {
|
||||
public:
|
||||
GrallocPreloader() { GrallocLoader::loadModule(); }
|
||||
};
|
||||
static GrallocPreloader sGrallocPreloader;
|
||||
|
||||
extern "C" IMapper* HIDL_FETCH_IMapper(const char* /*name*/) {
|
||||
return GrallocLoader::load();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
using android::hardware::graphics::mapper::V2_1::IMapper;
|
||||
using android::hardware::graphics::mapper::V2_1::passthrough::GrallocLoader;
|
||||
|
||||
// Preload the gralloc module such that GraphicBufferMapper::preloadHal is
|
||||
// meaningful
|
||||
class GrallocPreloader {
|
||||
public:
|
||||
GrallocPreloader() { GrallocLoader::loadModule(); }
|
||||
};
|
||||
static GrallocPreloader sGrallocPreloader;
|
||||
|
||||
extern "C" IMapper* HIDL_FETCH_IMapper(const char* /*name*/) {
|
||||
return GrallocLoader::load();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue