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

Commit 3866c7eb authored by Pawin Vongmasa's avatar Pawin Vongmasa
Browse files

Use the updated hybrid interface

Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 111902308

Change-Id: I7619b6ed3279cc2e31c230b9ab8bd1bca22e16d7
parent 0e2c6b80
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1803,7 +1803,8 @@ void forEachBlock(const std::list<std::unique_ptr<C2Work>>& workList,
}

sp<HGraphicBufferProducer> getHgbp(const sp<IGraphicBufferProducer>& igbp) {
    sp<HGraphicBufferProducer> hgbp = igbp->getHalInterface();
    sp<HGraphicBufferProducer> hgbp =
            igbp->getHalInterface<HGraphicBufferProducer>();
    return hgbp ? hgbp :
            new TWGraphicBufferProducer<HGraphicBufferProducer>(igbp);
}
+3 −1
Original line number Diff line number Diff line
@@ -1064,7 +1064,9 @@ c2_status_t Codec2Client::Component::setOutputSurface(
        C2BlockPool::local_id_t blockPoolId,
        const sp<IGraphicBufferProducer>& surface,
        uint32_t generation) {
    sp<HGraphicBufferProducer> igbp = surface->getHalInterface();
    sp<HGraphicBufferProducer> igbp =
            surface->getHalInterface<HGraphicBufferProducer>();

    if (!igbp) {
        igbp = new TWGraphicBufferProducer<HGraphicBufferProducer>(surface);
    }
+1 −1
Original line number Diff line number Diff line
@@ -552,7 +552,7 @@ public:
};

IMPLEMENT_META_INTERFACE(OMX, "android.hardware.IOMX");
IMPLEMENT_HYBRID_META_INTERFACE(OMXNode, IOmxNode, "android.hardware.IOMXNode");
IMPLEMENT_HYBRID_META_INTERFACE(OMXNode, "android.hardware.IOMXNode");

////////////////////////////////////////////////////////////////////////////////

+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ using ::android::sp;
 * - TW = Treble Wrapper --- It wraps a legacy object inside a Treble object.
 */

struct LWOmxNode : public H2BConverter<IOmxNode, IOMXNode, BnOMXNode> {
struct LWOmxNode : public H2BConverter<IOmxNode, BnOMXNode> {
    LWOmxNode(sp<IOmxNode> const& base) : CBase(base) {}
    status_t freeNode() override;
    status_t sendCommand(
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ LWGraphicBufferSource::LWGraphicBufferSource(

BnStatus LWGraphicBufferSource::configure(
        const sp<IOMXNode>& omxNode, int32_t dataSpace) {
    sp<IOmxNode> hOmxNode = omxNode->getHalInterface();
    sp<IOmxNode> hOmxNode = omxNode->getHalInterface<IOmxNode>();
    return toBinderStatus(mBase->configure(
            hOmxNode == nullptr ? new TWOmxNode(omxNode) : hOmxNode,
            toHardwareDataspace(dataSpace)));
Loading