diff options
author | 2017-04-17 15:20:19 -0700 | |
---|---|---|
committer | 2017-04-18 09:41:30 -0700 | |
commit | cb8405e7e74398aeafc9ef6ddb59af2d7cc6d2a6 (patch) | |
tree | d83989791e40ee7832b3451b4b40e50ffb928599 /libs/ui/Gralloc2.cpp | |
parent | c4ced4f015ef5ba66cc89440c89369190448a4e0 (diff) |
libui: remove gralloc0/gralloc1 support
We now talk to HIDL gralloc exclusively.
Bug: 37433368
Test: boots
Change-Id: Iecd2f9a02c7066b2f33f24c1de57e9c4af8e28f5
Diffstat (limited to 'libs/ui/Gralloc2.cpp')
-rw-r--r-- | libs/ui/Gralloc2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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"); } } |