From 6d0abbb439a8eb7199beeae35e599d6594edbbef Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 26 Jul 2023 15:54:47 -0400 Subject: [PATCH] Remove mapper from composer2.1 VTS Bug: 292584923 Test: make VtsHalGraphicsComposerV2_3TargetTest VtsHalGraphicsComposerV2_4TargetTest VtsHalGraphicsComposerV2_2TargetTest VtsHalGraphicsComposerV2_1TargetTest Change-Id: I3642995e7236a3b9b08ad5419c9d02b67243b24a --- .../composer/2.1/utils/resources/Android.bp | 7 +- .../2.1/utils/resources/ComposerResources.cpp | 67 ++--------- .../2.1/ComposerResources.h | 9 +- graphics/composer/2.1/utils/vts/Android.bp | 9 +- .../composer/2.1/utils/vts/ComposerVts.cpp | 107 ------------------ .../include/composer-vts/2.1/ComposerVts.h | 56 --------- .../composer/2.1/vts/functional/Android.bp | 12 +- .../VtsHalGraphicsComposerV2_1TargetTest.cpp | 49 ++++---- .../include/composer-vts/2.2/ReadbackVts.h | 1 - ...VtsHalGraphicsComposerV2_2ReadbackTest.cpp | 1 - .../VtsHalGraphicsComposerV2_2TargetTest.cpp | 1 - .../VtsHalGraphicsComposerV2_4TargetTest.cpp | 1 - 12 files changed, 42 insertions(+), 278 deletions(-) diff --git a/graphics/composer/2.1/utils/resources/Android.bp b/graphics/composer/2.1/utils/resources/Android.bp index 9eb23fa82e..405200317f 100644 --- a/graphics/composer/2.1/utils/resources/Android.bp +++ b/graphics/composer/2.1/utils/resources/Android.bp @@ -29,20 +29,15 @@ cc_library { vendor_available: true, shared_libs: [ "android.hardware.graphics.composer@2.1", - "android.hardware.graphics.mapper@2.0", - "android.hardware.graphics.mapper@3.0", - "android.hardware.graphics.mapper@4.0", "libcutils", "libhardware", // TODO remove hwcomposer2.h dependency "libhidlbase", "liblog", + "libui", "libutils", ], export_shared_lib_headers: [ "android.hardware.graphics.composer@2.1", - "android.hardware.graphics.mapper@2.0", - "android.hardware.graphics.mapper@3.0", - "android.hardware.graphics.mapper@4.0", "libhardware", "libhidlbase", "liblog", diff --git a/graphics/composer/2.1/utils/resources/ComposerResources.cpp b/graphics/composer/2.1/utils/resources/ComposerResources.cpp index e52bf7124a..80bfb7a26a 100644 --- a/graphics/composer/2.1/utils/resources/ComposerResources.cpp +++ b/graphics/composer/2.1/utils/resources/ComposerResources.cpp @@ -18,6 +18,8 @@ #include "composer-resources/2.1/ComposerResources.h" +#include + namespace android { namespace hardware { namespace graphics { @@ -25,23 +27,10 @@ namespace composer { namespace V2_1 { namespace hal { +ComposerHandleImporter::ComposerHandleImporter() : mMapper{GraphicBufferMapper::get()} {} + bool ComposerHandleImporter::init() { - mMapper4 = mapper::V4_0::IMapper::getService(); - if (mMapper4) { - return true; - } - ALOGI_IF(!mMapper4, "failed to get mapper 4.0 service, falling back to mapper 3.0"); - - mMapper3 = mapper::V3_0::IMapper::getService(); - if (mMapper3) { - return true; - } - ALOGI_IF(!mMapper3, "failed to get mapper 3.0 service, falling back to mapper 2.0"); - - mMapper2 = mapper::V2_0::IMapper::getService(); - ALOGE_IF(!mMapper2, "failed to get mapper 2.0 service"); - - return mMapper2 != nullptr; + return true; } Error ComposerHandleImporter::importBuffer(const native_handle_t* rawHandle, @@ -51,51 +40,17 @@ Error ComposerHandleImporter::importBuffer(const native_handle_t* rawHandle, return Error::NONE; } - const native_handle_t* bufferHandle; - if (mMapper2) { - mapper::V2_0::Error error; - mMapper2->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) { - error = tmpError; - bufferHandle = static_cast(tmpBufferHandle); - }); - if (error != mapper::V2_0::Error::NONE) { - return Error::NO_RESOURCES; - } + status_t status = mMapper.importBufferNoValidate(rawHandle, outBufferHandle); + if (status == STATUS_OK) { + return Error::NONE; + } else { + return Error::NO_RESOURCES; } - if (mMapper3) { - mapper::V3_0::Error error; - mMapper3->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) { - error = tmpError; - bufferHandle = static_cast(tmpBufferHandle); - }); - if (error != mapper::V3_0::Error::NONE) { - return Error::NO_RESOURCES; - } - } - if (mMapper4) { - mapper::V4_0::Error error; - mMapper4->importBuffer(rawHandle, [&](const auto& tmpError, const auto& tmpBufferHandle) { - error = tmpError; - bufferHandle = static_cast(tmpBufferHandle); - }); - if (error != mapper::V4_0::Error::NONE) { - return Error::NO_RESOURCES; - } - } - - *outBufferHandle = bufferHandle; - return Error::NONE; } void ComposerHandleImporter::freeBuffer(const native_handle_t* bufferHandle) { if (bufferHandle) { - if (mMapper2) { - mMapper2->freeBuffer(static_cast(const_cast(bufferHandle))); - } else if (mMapper3) { - mMapper3->freeBuffer(static_cast(const_cast(bufferHandle))); - } else if (mMapper4) { - mMapper4->freeBuffer(static_cast(const_cast(bufferHandle))); - } + mMapper.freeBuffer(bufferHandle); } } diff --git a/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h b/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h index de78a59e91..983811859e 100644 --- a/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h +++ b/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/ComposerResources.h @@ -27,12 +27,10 @@ #include -#include -#include -#include #include namespace android { +class GraphicBufferMapper; namespace hardware { namespace graphics { namespace composer { @@ -42,6 +40,7 @@ namespace hal { // wrapper for IMapper to import buffers and sideband streams class ComposerHandleImporter { public: + ComposerHandleImporter(); bool init(); Error importBuffer(const native_handle_t* rawHandle, const native_handle_t** outBufferHandle); @@ -50,9 +49,7 @@ class ComposerHandleImporter { void freeStream(const native_handle_t* streamHandle); private: - sp mMapper2; - sp mMapper3; - sp mMapper4; + GraphicBufferMapper& mMapper; }; class ComposerHandleCache { diff --git a/graphics/composer/2.1/utils/vts/Android.bp b/graphics/composer/2.1/utils/vts/Android.bp index 7b6a0e6367..0e0081d872 100644 --- a/graphics/composer/2.1/utils/vts/Android.bp +++ b/graphics/composer/2.1/utils/vts/Android.bp @@ -34,18 +34,15 @@ cc_library_static { "GraphicsComposerCallback.cpp", "TestCommandReader.cpp", ], + shared_libs: [ + "libui", + ], static_libs: [ "android.hardware.graphics.composer@2.1", - "android.hardware.graphics.mapper@2.0-vts", - "android.hardware.graphics.mapper@3.0-vts", - "android.hardware.graphics.mapper@4.0-vts", "libgtest", ], export_static_lib_headers: [ "android.hardware.graphics.composer@2.1", - "android.hardware.graphics.mapper@2.0-vts", - "android.hardware.graphics.mapper@3.0-vts", - "android.hardware.graphics.mapper@4.0-vts", ], header_libs: [ "android.hardware.graphics.composer@2.1-command-buffer", diff --git a/graphics/composer/2.1/utils/vts/ComposerVts.cpp b/graphics/composer/2.1/utils/vts/ComposerVts.cpp index 4603dd1b8c..8b8978465c 100644 --- a/graphics/composer/2.1/utils/vts/ComposerVts.cpp +++ b/graphics/composer/2.1/utils/vts/ComposerVts.cpp @@ -308,113 +308,6 @@ void ComposerClient::execute(TestCommandReader* reader, CommandWriterBase* write writer->reset(); } -NativeHandleWrapper::~NativeHandleWrapper() { - if (mHandle) { - mGralloc.freeBuffer(mHandle); - } -} - -Gralloc::Gralloc() { - [this] { - ASSERT_NO_FATAL_FAILURE(mGralloc4 = std::make_shared( - /*aidlAllocatorServiceName*/ IAllocator::descriptor + - std::string("/default"), - /*hidlAllocatorServiceName*/ "default", - /*mapperServiceName*/ "default", - /*errOnFailure=*/false)); - if (!mGralloc4->hasAllocator() || mGralloc4->getMapper() == nullptr) { - mGralloc4 = nullptr; - ASSERT_NO_FATAL_FAILURE(mGralloc3 = std::make_shared("default", "default", - /*errOnFailure=*/false)); - if (mGralloc3->getAllocator() == nullptr || mGralloc3->getMapper() == nullptr) { - mGralloc3 = nullptr; - ASSERT_NO_FATAL_FAILURE(mGralloc2 = std::make_shared()); - } - } - }(); -} - -const NativeHandleWrapper Gralloc::allocate(uint32_t width, uint32_t height, uint32_t layerCount, - PixelFormat format, uint64_t usage, bool import, - uint32_t* outStride) { - const native_handle_t* handle; - if (mGralloc4) { - IMapper4::BufferDescriptorInfo info{}; - info.width = width; - info.height = height; - info.layerCount = layerCount; - info.format = static_cast(format); - info.usage = usage; - handle = mGralloc4->allocate(info, import, outStride); - } else if (mGralloc3) { - IMapper3::BufferDescriptorInfo info{}; - info.width = width; - info.height = height; - info.layerCount = layerCount; - info.format = static_cast(format); - info.usage = usage; - handle = mGralloc3->allocate(info, import, outStride); - } else { - IMapper2::BufferDescriptorInfo info{}; - info.width = width; - info.height = height; - info.layerCount = layerCount; - info.format = format; - info.usage = usage; - handle = mGralloc2->allocate(info, import, outStride); - } - return NativeHandleWrapper(*this, handle); -} - -void* Gralloc::lock(const native_handle_t* bufferHandle, uint64_t cpuUsage, - const AccessRegion& accessRegionRect, int acquireFence) { - if (mGralloc4) { - IMapper4::Rect accessRegion; - accessRegion.left = accessRegionRect.left; - accessRegion.top = accessRegionRect.top; - accessRegion.width = accessRegionRect.width; - accessRegion.height = accessRegionRect.height; - return mGralloc4->lock(bufferHandle, cpuUsage, accessRegion, acquireFence); - } else if (mGralloc3) { - IMapper3::Rect accessRegion; - accessRegion.left = accessRegionRect.left; - accessRegion.top = accessRegionRect.top; - accessRegion.width = accessRegionRect.width; - accessRegion.height = accessRegionRect.height; - int32_t bytesPerPixel; - int32_t bytesPerStride; - return mGralloc3->lock(bufferHandle, cpuUsage, accessRegion, acquireFence, &bytesPerPixel, - &bytesPerStride); - } else { - IMapper2::Rect accessRegion; - accessRegion.left = accessRegionRect.left; - accessRegion.top = accessRegionRect.top; - accessRegion.width = accessRegionRect.width; - accessRegion.height = accessRegionRect.height; - return mGralloc2->lock(bufferHandle, cpuUsage, accessRegion, acquireFence); - } -} - -int Gralloc::unlock(const native_handle_t* bufferHandle) { - if (mGralloc4) { - return mGralloc4->unlock(bufferHandle); - } else if (mGralloc3) { - return mGralloc3->unlock(bufferHandle); - } else { - return mGralloc2->unlock(bufferHandle); - } -} - -void Gralloc::freeBuffer(const native_handle_t* bufferHandle) { - if (mGralloc4) { - mGralloc4->freeBuffer(bufferHandle); - } else if (mGralloc3) { - mGralloc3->freeBuffer(bufferHandle); - } else { - mGralloc2->freeBuffer(bufferHandle); - } -} - } // namespace vts } // namespace V2_1 } // namespace composer diff --git a/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h b/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h index f8ea661f12..c0aacb5748 100644 --- a/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h +++ b/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/ComposerVts.h @@ -25,9 +25,6 @@ #include #include #include -#include -#include -#include #include #include "gtest/gtest.h" @@ -43,13 +40,6 @@ using android::hardware::graphics::common::V1_0::ColorMode; using android::hardware::graphics::common::V1_0::Dataspace; using android::hardware::graphics::common::V1_0::Hdr; using android::hardware::graphics::common::V1_0::PixelFormat; -using IMapper2 = android::hardware::graphics::mapper::V2_0::IMapper; -using IMapper3 = android::hardware::graphics::mapper::V3_0::IMapper; -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; @@ -129,52 +119,6 @@ class ComposerClient { const sp mClient; }; -class AccessRegion { - public: - int32_t left; - int32_t top; - int32_t width; - int32_t height; -}; - -class Gralloc; - -// RAII wrapper around native_handle_t* -class NativeHandleWrapper { - public: - NativeHandleWrapper(Gralloc& gralloc, const native_handle_t* handle) - : mGralloc(gralloc), mHandle(handle) {} - - ~NativeHandleWrapper(); - - const native_handle_t* get() { return mHandle; } - - private: - Gralloc& mGralloc; - const native_handle_t* mHandle; -}; - -class Gralloc { - public: - explicit Gralloc(); - - const NativeHandleWrapper allocate(uint32_t width, uint32_t height, uint32_t layerCount, - PixelFormat format, uint64_t usage, bool import = true, - uint32_t* outStride = nullptr); - - void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage, - const AccessRegion& accessRegionRect, int acquireFence); - - int unlock(const native_handle_t* bufferHandle); - - void freeBuffer(const native_handle_t* bufferHandle); - - protected: - std::shared_ptr mGralloc2 = nullptr; - std::shared_ptr mGralloc3 = nullptr; - std::shared_ptr mGralloc4 = nullptr; -}; - } // namespace vts } // namespace V2_1 } // namespace composer diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp index 0f6d7e8eba..e6af356699 100644 --- a/graphics/composer/2.1/vts/functional/Android.bp +++ b/graphics/composer/2.1/vts/functional/Android.bp @@ -38,22 +38,12 @@ cc_test { "libbinder_ndk", "libfmq", "libsync", + "libui", "android.hardware.common-V2-ndk", - "android.hardware.graphics.mapper@2.0", - "android.hardware.graphics.mapper@2.1", - "android.hardware.graphics.mapper@3.0", - "android.hardware.graphics.mapper@4.0", ], static_libs: [ - "android.hardware.graphics.allocator@2.0", - "android.hardware.graphics.allocator@3.0", - "android.hardware.graphics.allocator@4.0", "android.hardware.graphics.composer@2.1", "android.hardware.graphics.composer@2.1-vts", - "android.hardware.graphics.mapper@2.0-vts", - "android.hardware.graphics.mapper@2.1-vts", - "android.hardware.graphics.mapper@3.0-vts", - "android.hardware.graphics.mapper@4.0-vts", "libaidlcommonsupport", ], header_libs: [ diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp index 9444d89f80..b67cfc2114 100644 --- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp +++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp @@ -25,9 +25,7 @@ #include #include #include -#include -#include -#include +#include #include @@ -52,7 +50,6 @@ using android::hardware::graphics::common::V1_0::ColorTransform; using android::hardware::graphics::common::V1_0::Dataspace; using android::hardware::graphics::common::V1_0::PixelFormat; using android::hardware::graphics::common::V1_0::Transform; -using GrallocError = android::hardware::graphics::mapper::V2_0::Error; class GraphicsComposerHidlTest : public ::testing::TestWithParam { protected: @@ -651,7 +648,6 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest { void SetUp() override { ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::SetUp()); - ASSERT_NO_FATAL_FAILURE(mGralloc = std::make_unique()); Config activeConfig = mComposerClient->getActiveConfig(mPrimaryDisplay); mDisplayWidth = mComposerClient->getDisplayAttribute(mPrimaryDisplay, activeConfig, IComposerClient::Attribute::WIDTH); @@ -666,13 +662,17 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest { ASSERT_NO_FATAL_FAILURE(GraphicsComposerHidlTest::TearDown()); } - NativeHandleWrapper allocate() { return allocate(mDisplayWidth, mDisplayHeight); } + sp allocate() { return allocate(mDisplayWidth, mDisplayHeight); } - NativeHandleWrapper allocate(uint32_t width, uint32_t height) { - uint64_t usage = + sp allocate(int32_t width, int32_t height) { + auto result = sp::make( + width, height, static_cast(PixelFormat::RGBA_8888), /*layerCount*/ 1, static_cast(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN | - BufferUsage::COMPOSER_OVERLAY); - return mGralloc->allocate(width, height, 1, PixelFormat::RGBA_8888, usage); + BufferUsage::COMPOSER_OVERLAY)); + if (result->initCheck() != STATUS_OK) { + return nullptr; + } + return result; } void execute() { mComposerClient->execute(mReader.get(), mWriter.get()); } @@ -681,9 +681,6 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest { std::unique_ptr mReader; int32_t mDisplayWidth; int32_t mDisplayHeight; - - private: - std::unique_ptr mGralloc; }; /** @@ -729,11 +726,11 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_OUTPUT_BUFFER) { display = mComposerClient->createVirtualDisplay(64, 64, PixelFormat::IMPLEMENTATION_DEFINED, kBufferSlotCount, &format)); - std::unique_ptr handle; - ASSERT_NO_FATAL_FAILURE(handle.reset(new NativeHandleWrapper(allocate()))); + auto handle = allocate(); + ASSERT_TRUE(handle); mWriter->selectDisplay(display); - mWriter->setOutputBuffer(0, handle->get(), -1); + mWriter->setOutputBuffer(0, handle->handle, -1); execute(); } @@ -802,7 +799,7 @@ TEST_P(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES) mWriter->setLayerZOrder(10); mWriter->setLayerBlendMode(IComposerClient::BlendMode::NONE); mWriter->setLayerSurfaceDamage(std::vector(1, displayFrame)); - mWriter->setLayerBuffer(0, handle.get(), -1); + mWriter->setLayerBuffer(0, handle->handle, -1); mWriter->setLayerDataspace(Dataspace::UNKNOWN); mWriter->validateDisplay(); @@ -820,7 +817,7 @@ TEST_P(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES) mWriter->selectLayer(layer); auto handle2 = allocate(); ASSERT_NE(nullptr, handle2.get()); - mWriter->setLayerBuffer(0, handle2.get(), -1); + mWriter->setLayerBuffer(0, handle2->handle, -1); mWriter->setLayerSurfaceDamage(std::vector(1, {0, 0, 10, 10})); mWriter->presentDisplay(); execute(); @@ -840,7 +837,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_CURSOR_POSITION) { mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); - mWriter->setLayerBuffer(0, handle.get(), -1); + mWriter->setLayerBuffer(0, handle->handle, -1); mWriter->setLayerCompositionType(IComposerClient::Composition::CURSOR); mWriter->setLayerDisplayFrame(displayFrame); mWriter->setLayerPlaneAlpha(1); @@ -881,7 +878,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_BUFFER) { mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); - mWriter->setLayerBuffer(0, handle.get(), -1); + mWriter->setLayerBuffer(0, handle->handle, -1); execute(); } @@ -905,7 +902,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_BUFFER_multipleTimes) { mWriter->selectLayer(layer); mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE); mWriter->setLayerDisplayFrame(displayFrame); - mWriter->setLayerBuffer(0, handle1.get(), -1); + mWriter->setLayerBuffer(0, handle1->handle, -1); mWriter->setLayerDataspace(Dataspace::UNKNOWN); mWriter->validateDisplay(); execute(); @@ -928,7 +925,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_BUFFER_multipleTimes) { mWriter->selectLayer(layer); mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE); mWriter->setLayerDisplayFrame(displayFrame); - mWriter->setLayerBuffer(1, handle2.get(), -1); + mWriter->setLayerBuffer(1, handle2->handle, -1); mWriter->setLayerDataspace(Dataspace::UNKNOWN); mWriter->validateDisplay(); execute(); @@ -951,7 +948,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_BUFFER_multipleTimes) { mWriter->selectLayer(layer); mWriter->setLayerCompositionType(IComposerClient::Composition::DEVICE); mWriter->setLayerDisplayFrame(displayFrame); - mWriter->setLayerBuffer(2, handle3.get(), -1); + mWriter->setLayerBuffer(2, handle3->handle, -1); mWriter->setLayerDataspace(Dataspace::UNKNOWN); mWriter->validateDisplay(); execute(); @@ -968,10 +965,10 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_BUFFER_multipleTimes) { // Ensure we can clear multiple buffer slots and then restore the active buffer at the end mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); - mWriter->setLayerBuffer(0, clearSlotBuffer.get(), -1); + mWriter->setLayerBuffer(0, clearSlotBuffer->handle, -1); mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); - mWriter->setLayerBuffer(1, clearSlotBuffer.get(), -1); + mWriter->setLayerBuffer(1, clearSlotBuffer->handle, -1); mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); mWriter->setLayerBuffer(2, nullptr, -1); @@ -1113,7 +1110,7 @@ TEST_P(GraphicsComposerHidlCommandTest, SET_LAYER_SIDEBAND_STREAM) { mWriter->selectDisplay(mPrimaryDisplay); mWriter->selectLayer(layer); - mWriter->setLayerSidebandStream(handle.get()); + mWriter->setLayerSidebandStream(handle->handle); execute(); } diff --git a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h index 87136988b1..aa6932ad0d 100644 --- a/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h +++ b/graphics/composer/2.2/utils/vts/include/composer-vts/2.2/ReadbackVts.h @@ -40,7 +40,6 @@ using common::V1_1::PixelFormat; using renderengine::LayerSettings; using V2_1::Display; using V2_1::Layer; -using V2_1::vts::AccessRegion; using V2_1::vts::TestCommandReader; static const IComposerClient::Color BLACK = {0, 0, 0, 0xff}; diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp index 7537b62c0a..4fac8d4b2b 100644 --- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp +++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp @@ -45,7 +45,6 @@ using common::V1_1::Dataspace; using common::V1_1::PixelFormat; using V2_1::Config; using V2_1::Display; -using V2_1::vts::NativeHandleWrapper; using V2_1::vts::TestCommandReader; class GraphicsCompositionTestBase : public ::testing::Test { diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp index 8f41598b2d..2bd287b29d 100644 --- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp +++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp @@ -39,7 +39,6 @@ using common::V1_1::ColorMode; using common::V1_1::Dataspace; using common::V1_1::PixelFormat; using common::V1_1::RenderIntent; -using V2_1::vts::NativeHandleWrapper; class GraphicsComposerHidlTest : public ::testing::TestWithParam { protected: diff --git a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp index 956c762409..7ae917b4ed 100644 --- a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp +++ b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp @@ -48,7 +48,6 @@ using common::V1_2::ColorMode; using common::V1_2::Dataspace; using common::V1_2::PixelFormat; using V2_1::Layer; -using V2_1::vts::NativeHandleWrapper; using V2_2::Transform; using ContentType = IComposerClient::ContentType;