From cb8405e7e74398aeafc9ef6ddb59af2d7cc6d2a6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 17 Apr 2017 15:20:19 -0700 Subject: libui: remove gralloc0/gralloc1 support We now talk to HIDL gralloc exclusively. Bug: 37433368 Test: boots Change-Id: Iecd2f9a02c7066b2f33f24c1de57e9c4af8e28f5 --- libs/ui/Gralloc2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libs/ui/Gralloc2.cpp') diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp index 75f568657d..f8d9401a0e 100644 --- a/libs/ui/Gralloc2.cpp +++ b/libs/ui/Gralloc2.cpp @@ -33,7 +33,7 @@ static constexpr Error kTransactionError = Error::NO_RESOURCES; Mapper::Mapper() { mMapper = IMapper::getService(); - if (mMapper != nullptr && mMapper->isRemote()) { + if (mMapper == nullptr || mMapper->isRemote()) { LOG_ALWAYS_FATAL("gralloc-mapper must be in passthrough mode"); } } @@ -196,8 +196,9 @@ int Mapper::unlock(buffer_handle_t bufferHandle) const Allocator::Allocator(const Mapper& mapper) : mMapper(mapper) { - if (mMapper.valid()) { - mAllocator = IAllocator::getService(); + mAllocator = IAllocator::getService(); + if (mAllocator == nullptr) { + LOG_ALWAYS_FATAL("gralloc-alloc is missing"); } } -- cgit v1.2.3-59-g8ed1b