Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 960c33c5 authored by Chia-I Wu's avatar Chia-I Wu Committed by Gerrit Code Review
Browse files

Merge "graphics: improve preloading for IMapper default impl"

parents 6fdd6b00 6d189b71
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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();
}
+8 −0
Original line number Diff line number Diff line
@@ -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();
}