diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-03-26 01:06:02 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-03-26 01:06:02 +0000 |
commit | 253a83b03ea680986399e761e767c12b56166de4 (patch) | |
tree | 0060561f2cfd890e5566173a7751b97a2935befc | |
parent | 11395bf5f9970579e938f40fd6e4c496a2658426 (diff) | |
parent | 818ead628110b5ae201c3665c93c7511701308e5 (diff) | |
download | v4l2_codec2-253a83b03ea680986399e761e767c12b56166de4.tar.gz |
Snap for 7236705 from 818ead628110b5ae201c3665c93c7511701308e5 to sc-release
Change-Id: I516dd09894cadde14aab2c8351b259f7028ec119
-rw-r--r-- | components/V4L2DecodeInterface.cpp | 2 | ||||
-rw-r--r-- | plugin_store/C2VdaBqBlockPool.cpp | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/components/V4L2DecodeInterface.cpp b/components/V4L2DecodeInterface.cpp index b0f677b..7a43a07 100644 --- a/components/V4L2DecodeInterface.cpp +++ b/components/V4L2DecodeInterface.cpp @@ -230,7 +230,7 @@ V4L2DecodeInterface::V4L2DecodeInterface(const std::string& name, bool secureMode = name.find(".secure") != std::string::npos; const C2Allocator::id_t inputAllocators[] = {secureMode ? V4L2AllocatorId::SECURE_LINEAR - : C2PlatformAllocatorStore::BLOB}; + : C2AllocatorStore::DEFAULT_LINEAR}; const C2Allocator::id_t outputAllocators[] = {V4L2AllocatorId::V4L2_BUFFERPOOL}; const C2Allocator::id_t surfaceAllocator = diff --git a/plugin_store/C2VdaBqBlockPool.cpp b/plugin_store/C2VdaBqBlockPool.cpp index 8ad8a0f..855f389 100644 --- a/plugin_store/C2VdaBqBlockPool.cpp +++ b/plugin_store/C2VdaBqBlockPool.cpp @@ -18,6 +18,7 @@ #include <C2AllocatorGralloc.h> #include <C2BlockInternal.h> +#include <C2SurfaceSyncObj.h> #include <android/hardware/graphics/bufferqueue/2.0/IProducerListener.h> #include <base/callback.h> #include <log/log.h> @@ -244,10 +245,12 @@ public: unique_id_t uniqueId; sp<GraphicBuffer> slotBuffer; + std::shared_ptr<C2SurfaceSyncMemory> syncMem; std::tie(uniqueId, slotBuffer) = getSlotBuffer(oldSlot); slot_t newSlot = poolData->migrate(producer->getBase(), mGenerationToBeMigrated, mUsageToBeMigrated, producerId, slotBuffer, - slotBuffer->getGenerationNumber()); + slotBuffer->getGenerationNumber(), + syncMem); if (newSlot < 0) { ALOGW("%s() Failed to migrate local buffer: uniqueId=%u, oldSlot=%d", __func__, uniqueId, oldSlot); @@ -604,10 +607,12 @@ c2_status_t C2VdaBqBlockPool::Impl::fetchGraphicBlock( } } + std::shared_ptr<C2SurfaceSyncMemory> syncMem; std::shared_ptr<C2GraphicAllocation> allocation = mTrackedGraphicBuffers.getRegisteredAllocation(uniqueId); auto poolData = std::make_shared<C2BufferQueueBlockPoolData>( - slotBuffer->getGenerationNumber(), mProducerId, slot, mProducer->getBase()); + slotBuffer->getGenerationNumber(), mProducerId, slot, + mProducer->getBase(), syncMem, 0); mTrackedGraphicBuffers.updatePoolData(slot, poolData); *block = _C2BlockFactory::CreateGraphicBlock(std::move(allocation), std::move(poolData)); if (*block == nullptr) { |