Loading libs/ui/Gralloc2.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ Gralloc2Mapper::Gralloc2Mapper() { mMapperV2_1 = IMapper::castFrom(mMapper); } bool Gralloc2Mapper::isSupported() const { bool Gralloc2Mapper::isLoaded() const { return mMapper != nullptr; } Loading Loading @@ -359,7 +359,7 @@ Gralloc2Allocator::Gralloc2Allocator(const Gralloc2Mapper& mapper) : mMapper(map } } bool Gralloc2Allocator::isSupported() const { bool Gralloc2Allocator::isLoaded() const { return mAllocator != nullptr; } Loading libs/ui/Gralloc3.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ Gralloc3Mapper::Gralloc3Mapper() { } } bool Gralloc3Mapper::isSupported() const { bool Gralloc3Mapper::isLoaded() const { return mMapper != nullptr; } Loading Loading @@ -322,7 +322,7 @@ Gralloc3Allocator::Gralloc3Allocator(const Gralloc3Mapper& mapper) : mMapper(map } } bool Gralloc3Allocator::isSupported() const { bool Gralloc3Allocator::isLoaded() const { return mAllocator != nullptr; } Loading libs/ui/GraphicBuffer.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -236,15 +236,15 @@ status_t GraphicBuffer::initWithHandle(const native_handle_t* inHandle, HandleWr return NO_ERROR; } status_t GraphicBuffer::lock(uint32_t inUsage, void** vaddr) { status_t GraphicBuffer::lock(uint32_t inUsage, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride) { const Rect lockBounds(width, height); status_t res = lock(inUsage, lockBounds, vaddr); status_t res = lock(inUsage, lockBounds, vaddr, outBytesPerPixel, outBytesPerStride); return res; } status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr) { status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride) { if (rect.left < 0 || rect.right > width || rect.top < 0 || rect.bottom > height) { ALOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)", Loading @@ -252,10 +252,10 @@ status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr) width, height); return BAD_VALUE; } int32_t bytesPerPixel, bytesPerStride; status_t res = getBufferMapper().lock(handle, inUsage, rect, vaddr, &bytesPerPixel, &bytesPerStride); status_t res = getBufferMapper().lock(handle, inUsage, rect, vaddr, outBytesPerPixel, outBytesPerStride); return res; } Loading libs/ui/GraphicBufferAllocator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -48,12 +48,12 @@ KeyedVector<buffer_handle_t, GraphicBufferAllocator::GraphicBufferAllocator() : mMapper(GraphicBufferMapper::getInstance()) { mAllocator = std::make_unique<const Gralloc3Allocator>( reinterpret_cast<const Gralloc3Mapper&>(mMapper.getGrallocMapper())); if (!mAllocator->isSupported()) { if (!mAllocator->isLoaded()) { mAllocator = std::make_unique<const Gralloc2Allocator>( reinterpret_cast<const Gralloc2Mapper&>(mMapper.getGrallocMapper())); } if (!mAllocator->isSupported()) { if (!mAllocator->isLoaded()) { LOG_ALWAYS_FATAL("gralloc-allocator is missing"); } } Loading libs/ui/GraphicBufferMapper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -51,11 +51,11 @@ void GraphicBufferMapper::preloadHal() { GraphicBufferMapper::GraphicBufferMapper() { mMapper = std::make_unique<const Gralloc3Mapper>(); if (!mMapper->isSupported()) { if (!mMapper->isLoaded()) { mMapper = std::make_unique<const Gralloc2Mapper>(); } if (!mMapper->isSupported()) { if (!mMapper->isLoaded()) { LOG_ALWAYS_FATAL("gralloc-mapper is missing"); } } Loading Loading
libs/ui/Gralloc2.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ Gralloc2Mapper::Gralloc2Mapper() { mMapperV2_1 = IMapper::castFrom(mMapper); } bool Gralloc2Mapper::isSupported() const { bool Gralloc2Mapper::isLoaded() const { return mMapper != nullptr; } Loading Loading @@ -359,7 +359,7 @@ Gralloc2Allocator::Gralloc2Allocator(const Gralloc2Mapper& mapper) : mMapper(map } } bool Gralloc2Allocator::isSupported() const { bool Gralloc2Allocator::isLoaded() const { return mAllocator != nullptr; } Loading
libs/ui/Gralloc3.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ Gralloc3Mapper::Gralloc3Mapper() { } } bool Gralloc3Mapper::isSupported() const { bool Gralloc3Mapper::isLoaded() const { return mMapper != nullptr; } Loading Loading @@ -322,7 +322,7 @@ Gralloc3Allocator::Gralloc3Allocator(const Gralloc3Mapper& mapper) : mMapper(map } } bool Gralloc3Allocator::isSupported() const { bool Gralloc3Allocator::isLoaded() const { return mAllocator != nullptr; } Loading
libs/ui/GraphicBuffer.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -236,15 +236,15 @@ status_t GraphicBuffer::initWithHandle(const native_handle_t* inHandle, HandleWr return NO_ERROR; } status_t GraphicBuffer::lock(uint32_t inUsage, void** vaddr) { status_t GraphicBuffer::lock(uint32_t inUsage, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride) { const Rect lockBounds(width, height); status_t res = lock(inUsage, lockBounds, vaddr); status_t res = lock(inUsage, lockBounds, vaddr, outBytesPerPixel, outBytesPerStride); return res; } status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr) { status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride) { if (rect.left < 0 || rect.right > width || rect.top < 0 || rect.bottom > height) { ALOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)", Loading @@ -252,10 +252,10 @@ status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr) width, height); return BAD_VALUE; } int32_t bytesPerPixel, bytesPerStride; status_t res = getBufferMapper().lock(handle, inUsage, rect, vaddr, &bytesPerPixel, &bytesPerStride); status_t res = getBufferMapper().lock(handle, inUsage, rect, vaddr, outBytesPerPixel, outBytesPerStride); return res; } Loading
libs/ui/GraphicBufferAllocator.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -48,12 +48,12 @@ KeyedVector<buffer_handle_t, GraphicBufferAllocator::GraphicBufferAllocator() : mMapper(GraphicBufferMapper::getInstance()) { mAllocator = std::make_unique<const Gralloc3Allocator>( reinterpret_cast<const Gralloc3Mapper&>(mMapper.getGrallocMapper())); if (!mAllocator->isSupported()) { if (!mAllocator->isLoaded()) { mAllocator = std::make_unique<const Gralloc2Allocator>( reinterpret_cast<const Gralloc2Mapper&>(mMapper.getGrallocMapper())); } if (!mAllocator->isSupported()) { if (!mAllocator->isLoaded()) { LOG_ALWAYS_FATAL("gralloc-allocator is missing"); } } Loading
libs/ui/GraphicBufferMapper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -51,11 +51,11 @@ void GraphicBufferMapper::preloadHal() { GraphicBufferMapper::GraphicBufferMapper() { mMapper = std::make_unique<const Gralloc3Mapper>(); if (!mMapper->isSupported()) { if (!mMapper->isLoaded()) { mMapper = std::make_unique<const Gralloc2Mapper>(); } if (!mMapper->isSupported()) { if (!mMapper->isLoaded()) { LOG_ALWAYS_FATAL("gralloc-mapper is missing"); } } Loading