Loading graphics/composer/2.1/utils/vts/ComposerVts.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -316,7 +316,11 @@ NativeHandleWrapper::~NativeHandleWrapper() { Gralloc::Gralloc() { [this] { ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>("default", "default", ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>( /*aidlAllocatorServiceName*/ IAllocator::descriptor + std::string("/default"), /*hidlAllocatorServiceName*/ "default", /*mapperServiceName*/ "default", /*errOnFailure=*/false)); if (!mGralloc4->hasAllocator() || mGralloc4->getMapper() == nullptr) { mGralloc4 = nullptr; Loading graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ using IMapper4 = android::hardware::graphics::mapper::V4_0::IMapper; using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc; using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc; using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc; using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator; class ComposerClient; Loading graphics/composer/2.2/utils/vts/ComposerVts.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -182,7 +182,11 @@ std::array<float, 16> ComposerClient::getDataspaceSaturationMatrix(Dataspace dat Gralloc::Gralloc() { [this] { ALOGD("Attempting to initialize gralloc4"); ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>("default", "default", ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>( /*aidlAllocatorServiceName*/ IAllocator::descriptor + std::string("/default"), /*hidlAllocatorServiceName*/ "default", /*mapperServiceName*/ "default", /*errOnFailure=*/false)); if (mGralloc4->getMapper() == nullptr || !mGralloc4->hasAllocator()) { mGralloc4 = nullptr; Loading graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc; using Gralloc2_1 = android::hardware::graphics::mapper::V2_1::vts::Gralloc; using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc; using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc; using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator; class ComposerClient; Loading graphics/mapper/4.0/utils/vts/MapperVts.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -27,21 +27,24 @@ namespace mapper { namespace V4_0 { namespace vts { Gralloc::Gralloc(const std::string& allocatorServiceName, const std::string& mapperServiceName, Gralloc::Gralloc(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName, bool errOnFailure) { if (errOnFailure) { init(allocatorServiceName, mapperServiceName); init(aidlAllocatorServiceName, hidlAllocatorServiceName, mapperServiceName); } else { initNoErr(allocatorServiceName, mapperServiceName); initNoErr(aidlAllocatorServiceName, hidlAllocatorServiceName, mapperServiceName); } } void Gralloc::init(const std::string& allocatorServiceName, const std::string& mapperServiceName) { void Gralloc::init(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName) { mAidlAllocator = aidl::android::hardware::graphics::allocator::IAllocator::fromBinder( ndk::SpAIBinder(AServiceManager_checkService(allocatorServiceName.c_str()))); ndk::SpAIBinder(AServiceManager_checkService(aidlAllocatorServiceName.c_str()))); if (mAidlAllocator == nullptr) { mHidlAllocator = IAllocator::getService(allocatorServiceName); mHidlAllocator = IAllocator::getService(hidlAllocatorServiceName); } ASSERT_TRUE(nullptr != mAidlAllocator || mHidlAllocator != nullptr) << "failed to get allocator service"; Loading @@ -51,13 +54,14 @@ void Gralloc::init(const std::string& allocatorServiceName, const std::string& m ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode"; } void Gralloc::initNoErr(const std::string& allocatorServiceName, void Gralloc::initNoErr(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName) { mAidlAllocator = aidl::android::hardware::graphics::allocator::IAllocator::fromBinder( ndk::SpAIBinder(AServiceManager_checkService(allocatorServiceName.c_str()))); ndk::SpAIBinder(AServiceManager_checkService(aidlAllocatorServiceName.c_str()))); if (mAidlAllocator == nullptr) { mHidlAllocator = IAllocator::getService(allocatorServiceName); mHidlAllocator = IAllocator::getService(hidlAllocatorServiceName); } mMapper = IMapper::getService(mapperServiceName); Loading Loading
graphics/composer/2.1/utils/vts/ComposerVts.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -316,7 +316,11 @@ NativeHandleWrapper::~NativeHandleWrapper() { Gralloc::Gralloc() { [this] { ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>("default", "default", ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>( /*aidlAllocatorServiceName*/ IAllocator::descriptor + std::string("/default"), /*hidlAllocatorServiceName*/ "default", /*mapperServiceName*/ "default", /*errOnFailure=*/false)); if (!mGralloc4->hasAllocator() || mGralloc4->getMapper() == nullptr) { mGralloc4 = nullptr; Loading
graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ using IMapper4 = android::hardware::graphics::mapper::V4_0::IMapper; using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc; using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc; using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc; using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator; class ComposerClient; Loading
graphics/composer/2.2/utils/vts/ComposerVts.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -182,7 +182,11 @@ std::array<float, 16> ComposerClient::getDataspaceSaturationMatrix(Dataspace dat Gralloc::Gralloc() { [this] { ALOGD("Attempting to initialize gralloc4"); ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>("default", "default", ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared<Gralloc4>( /*aidlAllocatorServiceName*/ IAllocator::descriptor + std::string("/default"), /*hidlAllocatorServiceName*/ "default", /*mapperServiceName*/ "default", /*errOnFailure=*/false)); if (mGralloc4->getMapper() == nullptr || !mGralloc4->hasAllocator()) { mGralloc4 = nullptr; Loading
graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ComposerVts.h +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ using Gralloc2 = android::hardware::graphics::mapper::V2_0::vts::Gralloc; using Gralloc2_1 = android::hardware::graphics::mapper::V2_1::vts::Gralloc; using Gralloc3 = android::hardware::graphics::mapper::V3_0::vts::Gralloc; using Gralloc4 = android::hardware::graphics::mapper::V4_0::vts::Gralloc; using IAllocator = aidl::android::hardware::graphics::allocator::IAllocator; class ComposerClient; Loading
graphics/mapper/4.0/utils/vts/MapperVts.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -27,21 +27,24 @@ namespace mapper { namespace V4_0 { namespace vts { Gralloc::Gralloc(const std::string& allocatorServiceName, const std::string& mapperServiceName, Gralloc::Gralloc(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName, bool errOnFailure) { if (errOnFailure) { init(allocatorServiceName, mapperServiceName); init(aidlAllocatorServiceName, hidlAllocatorServiceName, mapperServiceName); } else { initNoErr(allocatorServiceName, mapperServiceName); initNoErr(aidlAllocatorServiceName, hidlAllocatorServiceName, mapperServiceName); } } void Gralloc::init(const std::string& allocatorServiceName, const std::string& mapperServiceName) { void Gralloc::init(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName) { mAidlAllocator = aidl::android::hardware::graphics::allocator::IAllocator::fromBinder( ndk::SpAIBinder(AServiceManager_checkService(allocatorServiceName.c_str()))); ndk::SpAIBinder(AServiceManager_checkService(aidlAllocatorServiceName.c_str()))); if (mAidlAllocator == nullptr) { mHidlAllocator = IAllocator::getService(allocatorServiceName); mHidlAllocator = IAllocator::getService(hidlAllocatorServiceName); } ASSERT_TRUE(nullptr != mAidlAllocator || mHidlAllocator != nullptr) << "failed to get allocator service"; Loading @@ -51,13 +54,14 @@ void Gralloc::init(const std::string& allocatorServiceName, const std::string& m ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode"; } void Gralloc::initNoErr(const std::string& allocatorServiceName, void Gralloc::initNoErr(const std::string& aidlAllocatorServiceName, const std::string& hidlAllocatorServiceName, const std::string& mapperServiceName) { mAidlAllocator = aidl::android::hardware::graphics::allocator::IAllocator::fromBinder( ndk::SpAIBinder(AServiceManager_checkService(allocatorServiceName.c_str()))); ndk::SpAIBinder(AServiceManager_checkService(aidlAllocatorServiceName.c_str()))); if (mAidlAllocator == nullptr) { mHidlAllocator = IAllocator::getService(allocatorServiceName); mHidlAllocator = IAllocator::getService(hidlAllocatorServiceName); } mMapper = IMapper::getService(mapperServiceName); Loading