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

Commit 8e54db1b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove bufferhub support from libgui." am: 79aca929

parents 3512160a 79aca929
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -177,8 +177,6 @@ cc_library_shared {

        "BitTube.cpp",
        "BLASTBufferQueue.cpp",
        "BufferHubConsumer.cpp",
        "BufferHubProducer.cpp",
        "BufferItemConsumer.cpp",
        "ConsumerBase.cpp",
        "CpuConsumer.cpp",
@@ -216,9 +214,6 @@ cc_library_shared {

    shared_libs: [
        "libbinder",
        "libbufferhub",
        "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
        "libpdx_default_transport",
    ],

    export_shared_lib_headers: [
@@ -229,24 +224,6 @@ cc_library_shared {
        "libgui_aidl_headers",
    ],

    // bufferhub is not used when building libgui for vendors
    target: {
        vendor: {
            cflags: [
                "-DNO_BUFFERHUB",
            ],
            exclude_srcs: [
                "BufferHubConsumer.cpp",
                "BufferHubProducer.cpp",
            ],
            exclude_shared_libs: [
                "libbufferhub",
                "libbufferhubqueue",
                "libpdx_default_transport",
            ],
        },
    },

    aidl: {
        export_aidl_headers: true,
    },
@@ -276,7 +253,6 @@ cc_library_static {
    min_sdk_version: "29",

    cflags: [
        "-DNO_BUFFERHUB",
        "-DNO_BINDER",
    ],

libs/gui/BufferHubConsumer.cpp

deleted100644 → 0
+0 −161
Original line number Diff line number Diff line
/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gui/BufferHubConsumer.h>

namespace android {

using namespace dvr;

/* static */
sp<BufferHubConsumer> BufferHubConsumer::Create(const std::shared_ptr<ConsumerQueue>& queue) {
    sp<BufferHubConsumer> consumer = new BufferHubConsumer;
    consumer->mQueue = queue;
    return consumer;
}

/* static */ sp<BufferHubConsumer> BufferHubConsumer::Create(ConsumerQueueParcelable parcelable) {
    if (!parcelable.IsValid()) {
        ALOGE("BufferHubConsumer::Create: Invalid consumer parcelable.");
        return nullptr;
    }

    sp<BufferHubConsumer> consumer = new BufferHubConsumer;
    consumer->mQueue = ConsumerQueue::Import(parcelable.TakeChannelHandle());
    return consumer;
}

status_t BufferHubConsumer::acquireBuffer(BufferItem* /*buffer*/, nsecs_t /*presentWhen*/,
                                          uint64_t /*maxFrameNumber*/) {
    ALOGE("BufferHubConsumer::acquireBuffer: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::detachBuffer(int /*slot*/) {
    ALOGE("BufferHubConsumer::detachBuffer: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::attachBuffer(int* /*outSlot*/, const sp<GraphicBuffer>& /*buffer*/) {
    ALOGE("BufferHubConsumer::attachBuffer: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::releaseBuffer(int /*buf*/, uint64_t /*frameNumber*/,
                                          EGLDisplay /*display*/, EGLSyncKHR /*fence*/,
                                          const sp<Fence>& /*releaseFence*/) {
    ALOGE("BufferHubConsumer::releaseBuffer: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::consumerConnect(const sp<IConsumerListener>& /*consumer*/,
                                            bool /*controlledByApp*/) {
    ALOGE("BufferHubConsumer::consumerConnect: not implemented.");

    // TODO(b/73267953): Make BufferHub honor producer and consumer connection. Returns NO_ERROR to
    // make IGraphicBufferConsumer_test happy.
    return NO_ERROR;
}

status_t BufferHubConsumer::consumerDisconnect() {
    ALOGE("BufferHubConsumer::consumerDisconnect: not implemented.");

    // TODO(b/73267953): Make BufferHub honor producer and consumer connection. Returns NO_ERROR to
    // make IGraphicBufferConsumer_test happy.
    return NO_ERROR;
}

status_t BufferHubConsumer::getReleasedBuffers(uint64_t* /*slotMask*/) {
    ALOGE("BufferHubConsumer::getReleasedBuffers: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setDefaultBufferSize(uint32_t /*w*/, uint32_t /*h*/) {
    ALOGE("BufferHubConsumer::setDefaultBufferSize: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setMaxBufferCount(int /*bufferCount*/) {
    ALOGE("BufferHubConsumer::setMaxBufferCount: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setMaxAcquiredBufferCount(int /*maxAcquiredBuffers*/) {
    ALOGE("BufferHubConsumer::setMaxAcquiredBufferCount: not implemented.");

    // TODO(b/73267953): Make BufferHub honor producer and consumer connection. Returns NO_ERROR to
    // make IGraphicBufferConsumer_test happy.
    return NO_ERROR;
}

status_t BufferHubConsumer::setConsumerName(const String8& /*name*/) {
    ALOGE("BufferHubConsumer::setConsumerName: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setDefaultBufferFormat(PixelFormat /*defaultFormat*/) {
    ALOGE("BufferHubConsumer::setDefaultBufferFormat: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setDefaultBufferDataSpace(android_dataspace /*defaultDataSpace*/) {
    ALOGE("BufferHubConsumer::setDefaultBufferDataSpace: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setConsumerUsageBits(uint64_t /*usage*/) {
    ALOGE("BufferHubConsumer::setConsumerUsageBits: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setConsumerIsProtected(bool /*isProtected*/) {
    ALOGE("BufferHubConsumer::setConsumerIsProtected: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::setTransformHint(uint32_t /*hint*/) {
    ALOGE("BufferHubConsumer::setTransformHint: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::getSidebandStream(sp<NativeHandle>* /*outStream*/) const {
    ALOGE("BufferHubConsumer::getSidebandStream: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::getOccupancyHistory(
        bool /*forceFlush*/, std::vector<OccupancyTracker::Segment>* /*outHistory*/) {
    ALOGE("BufferHubConsumer::getOccupancyHistory: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::discardFreeBuffers() {
    ALOGE("BufferHubConsumer::discardFreeBuffers: not implemented.");
    return INVALID_OPERATION;
}

status_t BufferHubConsumer::dumpState(const String8& /*prefix*/, String8* /*outResult*/) const {
    ALOGE("BufferHubConsumer::dumpState: not implemented.");
    return INVALID_OPERATION;
}

IBinder* BufferHubConsumer::onAsBinder() {
    ALOGE("BufferHubConsumer::onAsBinder: BufferHubConsumer should never be used as an Binder "
          "object.");
    return nullptr;
}

} // namespace android
Loading