Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c809599 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use bufferpool@2.0"

parents e50bde73 d3318084
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ std::atomic<std::uint32_t> Accessor::Impl::BufferPool::Invalidation::sInvSeqId(0

Accessor::Impl::Impl::BufferPool::~BufferPool() {
    std::lock_guard<std::mutex> lock(mMutex);
    ALOGD("Destruction - bufferpool %p "
    ALOGD("Destruction - bufferpool2 %p "
          "cached: %zu/%zuM, %zu/%d%% in use; "
          "allocs: %zu, %d%% recycled; "
          "transfers: %zu, %d%% unfetced",
@@ -353,12 +353,12 @@ void Accessor::Impl::BufferPool::Invalidation::onInvalidationRequest(
            msgId = ++mInvalidationId;
        }
    }
    ALOGV("bufferpool invalidation requested and queued");
    ALOGV("bufferpool2 invalidation requested and queued");
    if (left == 0) {
        channel.postInvalidation(msgId, from, to);
    } else {
        // TODO: sending hint message?
        ALOGV("bufferpool invalidation requested and pending");
        ALOGV("bufferpoo2 invalidation requested and pending");
        Pending pending(needsAck, from, to, left, impl);
        mPendings.push_back(pending);
    }
@@ -380,7 +380,7 @@ void Accessor::Impl::BufferPool::Invalidation::onHandleAck() {
                    // lost.
                    it->second = mInvalidationId;
                } else {
                    ALOGV("bufferpool observer died %lld", (long long)it->first);
                    ALOGV("bufferpool2 observer died %lld", (long long)it->first);
                    deads.insert(it->first);
                }
            }
@@ -682,7 +682,7 @@ void Accessor::Impl::BufferPool::cleanUp(bool clearCache) {
        mLastCleanUpUs = mTimestampUs;
        if (mTimestampUs > mLastLogUs + kLogDurationUs) {
            mLastLogUs = mTimestampUs;
            ALOGD("bufferpool %p : %zu(%zu size) total buffers - "
            ALOGD("bufferpool2 %p : %zu(%zu size) total buffers - "
                  "%zu(%zu size) used buffers - %zu/%zu (recycle/alloc) - "
                  "%zu/%zu (fetch/transfer)",
                  this, mStats.mBuffersCached, mStats.mSizeCached,
@@ -703,7 +703,7 @@ void Accessor::Impl::BufferPool::cleanUp(bool clearCache) {
                freeIt = mFreeBuffers.erase(freeIt);
            } else {
                ++freeIt;
                ALOGW("bufferpool inconsistent!");
                ALOGW("bufferpool2 inconsistent!");
            }
        }
    }
@@ -722,7 +722,7 @@ void Accessor::Impl::BufferPool::invalidate(
                freeIt = mFreeBuffers.erase(freeIt);
                continue;
            } else {
                ALOGW("bufferpool inconsistent!");
                ALOGW("bufferpool2 inconsistent!");
            }
        }
        ++freeIt;
+1 −1
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ ResultStatus BufferPoolClient::getAccessor(sp<IAccessor> *accessor) {
}

void BufferPoolClient::receiveInvalidation(uint32_t msgId) {
    ALOGV("bufferpool client recv inv %u", msgId);
    ALOGV("bufferpool2 client recv inv %u", msgId);
    if (isValid()) {
        mImpl->receiveInvalidation(msgId);
    }
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ cc_library {
        "android.hardware.graphics.bufferqueue@1.0",
        "android.hardware.graphics.common@1.0",
        "android.hardware.media@1.0",
        "android.hardware.media.bufferpool@1.0",
        "android.hardware.media.bufferpool@2.0",
        "android.hardware.media.c2@1.0",
        "android.hardware.media.omx@1.0",
        "libbase",
@@ -35,7 +35,7 @@ cc_library {
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libstagefright_bufferpool@1.0",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferqueue_helper",
        "libui",
        "libutils",
@@ -49,7 +49,7 @@ cc_library {
        "android.hardware.media.c2@1.0",
        "libcodec2",
        "libhidlbase",
        "libstagefright_bufferpool@1.0",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferqueue_helper",
        "libui",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ Component::Component(
        const std::shared_ptr<C2Component>& component,
        const sp<IComponentListener>& listener,
        const sp<ComponentStore>& store,
        const sp<::android::hardware::media::bufferpool::V1_0::
        const sp<::android::hardware::media::bufferpool::V2_0::
        IClientManager>& clientPoolManager) :
    Configurable(new CachedConfigurable(
            std::make_unique<CompIntf>(component->intf()))),
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ namespace utils {

using namespace ::android;
using ::android::GraphicBufferSource;
using namespace ::android::hardware::media::bufferpool::V1_0::implementation;
using namespace ::android::hardware::media::bufferpool::V2_0::implementation;

namespace /* unnamed */ {

Loading