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

Commit ac2c7ec0 authored by Omprakash Dhyade c_odhyad@quicinc.com's avatar Omprakash Dhyade c_odhyad@quicinc.com Committed by Steve Kondik
Browse files

frameworks/base: Add setFd api to Overlay

setFd() is for client to pass its own buffer id
for Overlay HW engine to directly access.

Change-Id: I4e727cdb7d34d24b84bde41892694969ad2d4841
parent 1348736d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2007 The Android Open Source Project
 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -91,6 +92,7 @@ public:

    /* set the buffer attributes */
    status_t setParameter(int param, int value);
    status_t setFd(int fd);

    /* returns the address of a given buffer if supported, NULL otherwise. */
    void* getBufferAddress(overlay_buffer_t buffer);
+7 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2007 The Android Open Source Project
 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -83,6 +84,12 @@ status_t Overlay::getCrop(uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h)
    return mOverlayData->getCrop(mOverlayData, x, y, w, h);
}

status_t Overlay::setFd(int fd)
{
    if (mStatus != NO_ERROR) return mStatus;
    return mOverlayData->setFd(mOverlayData, fd);
}

int32_t Overlay::getBufferCount() const
{
    if (mStatus != NO_ERROR) return mStatus;