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

Commit 20288fd8 authored by Chong Zhang's avatar Chong Zhang
Browse files

Move WGraphicBufferProducer into libgui

So that client side omx codec code no longer need to
link to libstagefright_bufferqueue_helper (which we
want to link on server side only).

bug: 129272021

Change-Id: Id69854158b4083ff8f0280decd599d86f11db4f5
parent bcec18de
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -83,8 +83,10 @@ cc_library_shared {
        "SyncFeatures.cpp",
        "view/Surface.cpp",
        "bufferqueue/1.0/B2HProducerListener.cpp",
        "bufferqueue/1.0/Conversion.cpp",
        "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
        "bufferqueue/1.0/H2BProducerListener.cpp",
        "bufferqueue/1.0/WProducerListener.cpp",
        "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
        "bufferqueue/2.0/B2HProducerListener.cpp",
        "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
+1542 −0

File added.

Preview size limit exceeded, changes collapsed.

+50 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016, 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/bufferqueue/1.0/WProducerListener.h>

namespace android {

// TWProducerListener
TWProducerListener::TWProducerListener(
        sp<BProducerListener> const& base):
    mBase(base) {
}

Return<void> TWProducerListener::onBufferReleased() {
    mBase->onBufferReleased();
    return Void();
}

Return<bool> TWProducerListener::needsReleaseNotify() {
    return mBase->needsReleaseNotify();
}

// LWProducerListener
LWProducerListener::LWProducerListener(
        sp<HProducerListener> const& base):
    mBase(base) {
}

void LWProducerListener::onBufferReleased() {
    mBase->onBufferReleased();
}

bool LWProducerListener::needsReleaseNotify() {
    return static_cast<bool>(mBase->needsReleaseNotify());
}

}  // namespace android
+3 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@

#include <binder/IInterface.h>

#include <ui/BufferQueueDefs.h>
#include <ui/Fence.h>
#include <ui/GraphicBuffer.h>
#include <ui/Rect.h>
@@ -75,10 +76,10 @@ public:
    enum {
        // A flag returned by dequeueBuffer when the client needs to call
        // requestBuffer immediately thereafter.
        BUFFER_NEEDS_REALLOCATION = 0x1,
        BUFFER_NEEDS_REALLOCATION = BufferQueueDefs::BUFFER_NEEDS_REALLOCATION,
        // A flag returned by dequeueBuffer when all mirrored slots should be
        // released by the client. This flag should always be processed first.
        RELEASE_ALL_BUFFERS       = 0x2,
        RELEASE_ALL_BUFFERS       = BufferQueueDefs::RELEASE_ALL_BUFFERS,
    };

    enum {
+765 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading