diff options
author | Andrii Chepurnyi <andrii_chepurnyi@epam.com> | 2018-05-17 18:34:01 +0300 |
---|---|---|
committer | Andrii Chepurnyi <andrii_chepurnyi@epam.com> | 2018-05-17 19:45:49 +0300 |
commit | 1d224e83270be782040e00a8eb51d4b20dc740d0 (patch) | |
tree | 3eb13e8d5473d611f340206a732623875e4867ee /drmhwctwo.cpp | |
parent | dc1278c078b1035e86085f568f2e8ff103d478a0 (diff) |
drm_hwcomposer: Remove gralloc from generic code
Clean up direct gralloc usage from generic code.
Because of gralloc0/gralloc1 difference, it should
be only used by platform* part.
Signed-off-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
Diffstat (limited to 'drmhwctwo.cpp')
-rw-r--r-- | drmhwctwo.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp index 7ca3e62..dee7401 100644 --- a/drmhwctwo.cpp +++ b/drmhwctwo.cpp @@ -70,17 +70,9 @@ HWC2::Error DrmHwcTwo::Init() { return HWC2::Error::NoResources; } - ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, - (const hw_module_t **)&gralloc_); - if (ret) { - ALOGE("Failed to open gralloc module %d", ret); - return HWC2::Error::NoResources; - } - displays_.emplace(std::piecewise_construct, std::forward_as_tuple(HWC_DISPLAY_PRIMARY), - std::forward_as_tuple(&drm_, importer_, gralloc_, - HWC_DISPLAY_PRIMARY, + std::forward_as_tuple(&drm_, importer_, HWC_DISPLAY_PRIMARY, HWC2::DisplayType::Physical)); DrmCrtc *crtc = drm_.GetCrtcForDisplay(static_cast<int>(HWC_DISPLAY_PRIMARY)); @@ -160,13 +152,8 @@ HWC2::Error DrmHwcTwo::RegisterCallback(int32_t descriptor, DrmHwcTwo::HwcDisplay::HwcDisplay(DrmResources *drm, std::shared_ptr<Importer> importer, - const gralloc_module_t *gralloc, hwc2_display_t handle, HWC2::DisplayType type) - : drm_(drm), - importer_(importer), - gralloc_(gralloc), - handle_(handle), - type_(type) { + : drm_(drm), importer_(importer), handle_(handle), type_(type) { supported(__func__); } |