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

Commit c6d5e1da authored by Naomi Luis's avatar Naomi Luis Committed by toastcfh
Browse files

SurfaceTexture: Add Qcom perform function.

Add a perform function that performs Qcom specific operations. The
client invokes the ANativeWindow's perform operation with the Qcom
specific operation and the arguments. The SurfaceTexture server
performs the required operation.

Change-Id: Id96ac8e2402c201c539e298b81774076f4e298fb
parent 4cc201c5
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -127,6 +127,20 @@ protected:
    // This method will fail if the the SurfaceTexture is not currently
    // connected to the specified client API.
    virtual status_t disconnect(int api) = 0;

#ifdef QCOM_HARDWARE
    // performQcomOperation performs Qcom specific operations. The actual
    // operation to be performed depends on the operation specified.
    //
    // The argument list is filled by the client based on the operation that
    // the client wants to specify.
    //
    // This method will fail if the operation is invalid or the arguments
    // specified in the operation are invalid.
    virtual status_t performQcomOperation(int operation, int arg1, int  arg2,
                                          int arg3) = 0;
#endif

};

// ----------------------------------------------------------------------------
+4 −1
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ public:

    virtual int query(int what, int* value);

#ifdef QCOM_HARDWARE
    virtual int performQcomOperation(int operation, int arg1, int arg2, int arg3);
#endif

    // setSynchronousMode set whether dequeueBuffer is synchronous or
    // asynchronous. In synchronous mode, dequeueBuffer blocks until
    // a buffer is available, the currently bound buffer can be dequeued and
@@ -508,7 +512,6 @@ private:
    // with the surface Texture.
    uint64_t mFrameCounter;


};

// ----------------------------------------------------------------------------
+6 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@ private:
    int dispatchSetUsage(va_list args);
    int dispatchLock(va_list args);
    int dispatchUnlockAndPost(va_list args);
#ifdef QCOM_HARDWARE
    int dispatchPerformQcomOperation(int operation, va_list args);
#endif

protected:
    virtual int cancelBuffer(ANativeWindowBuffer* buffer);
@@ -93,6 +96,9 @@ protected:
    virtual int setUsage(uint32_t reqUsage);
    virtual int lock(ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds);
    virtual int unlockAndPost();
#ifdef QCOM_HARDWARE
    virtual int performQcomOperation(int operation, int arg1, int arg2, int arg3);
#endif

    enum { MIN_UNDEQUEUED_BUFFERS = SurfaceTexture::MIN_UNDEQUEUED_BUFFERS };
    enum { NUM_BUFFER_SLOTS = SurfaceTexture::NUM_BUFFER_SLOTS };
+12 −0
Original line number Diff line number Diff line
@@ -127,6 +127,18 @@ public:
    // modes (S.Encoder vis-a-vis SurfaceTexture)
    virtual status_t setSynchronousMode(bool enabled);

#ifdef QCOM_HARDWARE
    // performQcomOperation performs Qcom specific operations. The actual
    // operation to be performed depends on the operation specified.
    //
    // The argument list is filled by the client based on the operation that
    // the client wants to specify.
    //
    // This method will fail if the operation is invalid or the arguments
    // specified in the operation are invalid.
    virtual status_t performQcomOperation(int operation, int arg1, int arg2, int arg3) {}
#endif

    // connect attempts to connect a client API to the SurfaceMediaSource.  This
    // must be called before any other ISurfaceTexture methods are called except
    // for getAllocator.
+7 −1
Original line number Diff line number Diff line
@@ -27,8 +27,14 @@ LOCAL_SHARED_LIBRARIES := \
	libhardware_legacy \
	libui \
	libEGL \
	libGLESv2 \
	libGLESv2

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
LOCAL_SHARED_LIBRARIES := \
        libQcomUI
LOCAL_C_INCLUDES := hardware/qcom/display/libqcomui
LOCAL_CFLAGS += -DQCOM_HARDWARE
endif

LOCAL_MODULE:= libgui

Loading