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

Commit b2a153ad authored by Iliyan Malchev's avatar Iliyan Malchev
Browse files

frameworks/base: android_native_buffer_t -> ANativeWindowBuffer



Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: default avatarIliyan Malchev <malchev@google.com>
parent be0cc365
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -45,20 +45,20 @@ private:
    SurfaceTextureClient(const SurfaceTextureClient& rhs);

    // ANativeWindow hooks
    static int cancelBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
    static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int cancelBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int dequeueBuffer(ANativeWindow* window, ANativeWindowBuffer** buffer);
    static int lockBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int perform(ANativeWindow* window, int operation, ...);
    static int query(const ANativeWindow* window, int what, int* value);
    static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int queueBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int setSwapInterval(ANativeWindow* window, int interval);

    int cancelBuffer(android_native_buffer_t* buffer);
    int dequeueBuffer(android_native_buffer_t** buffer);
    int lockBuffer(android_native_buffer_t* buffer);
    int cancelBuffer(ANativeWindowBuffer* buffer);
    int dequeueBuffer(ANativeWindowBuffer** buffer);
    int lockBuffer(ANativeWindowBuffer* buffer);
    int perform(int operation, va_list args);
    int query(int what, int* value) const;
    int queueBuffer(android_native_buffer_t* buffer);
    int queueBuffer(ANativeWindowBuffer* buffer);
    int setSwapInterval(int interval);

    int dispatchConnect(va_list args);
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ struct UseAndroidNativeBufferParams {
    OMX_U32 nPortIndex;
    OMX_PTR pAppPrivate;
    OMX_BUFFERHEADERTYPE **bufferHeader;
    const sp<android_native_buffer_t>& nativeBuffer;
    const sp<ANativeWindowBuffer>& nativeBuffer;
};

// A pointer to this struct is passed to OMX_GetParameter when the extension
+8 −8
Original line number Diff line number Diff line
@@ -202,17 +202,17 @@ private:
     *  ANativeWindow hooks
     */
    static int setSwapInterval(ANativeWindow* window, int interval);
    static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
    static int cancelBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int dequeueBuffer(ANativeWindow* window, ANativeWindowBuffer** buffer);
    static int cancelBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int lockBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int queueBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int query(const ANativeWindow* window, int what, int* value);
    static int perform(ANativeWindow* window, int operation, ...);

    int dequeueBuffer(android_native_buffer_t** buffer);
    int lockBuffer(android_native_buffer_t* buffer);
    int queueBuffer(android_native_buffer_t* buffer);
    int cancelBuffer(android_native_buffer_t* buffer);
    int dequeueBuffer(ANativeWindowBuffer** buffer);
    int lockBuffer(ANativeWindowBuffer* buffer);
    int queueBuffer(ANativeWindowBuffer* buffer);
    int cancelBuffer(ANativeWindowBuffer* buffer);
    int query(int what, int* value) const;
    int perform(int operation, va_list args);

+3 −3
Original line number Diff line number Diff line
@@ -67,9 +67,9 @@ private:
    friend class LightRefBase<FramebufferNativeWindow>;    
    ~FramebufferNativeWindow(); // this class cannot be overloaded
    static int setSwapInterval(ANativeWindow* window, int interval);
    static int dequeueBuffer(ANativeWindow* window, android_native_buffer_t** buffer);
    static int lockBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int queueBuffer(ANativeWindow* window, android_native_buffer_t* buffer);
    static int dequeueBuffer(ANativeWindow* window, ANativeWindowBuffer** buffer);
    static int lockBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int queueBuffer(ANativeWindow* window, ANativeWindowBuffer* buffer);
    static int query(const ANativeWindow* window, int what, int* value);
    static int perform(ANativeWindow* window, int operation, ...);
    
+6 −6
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#include <utils/Flattenable.h>
#include <pixelflinger/pixelflinger.h>

struct android_native_buffer_t;
struct ANativeWindowBuffer;

namespace android {

@@ -38,7 +38,7 @@ class GraphicBufferMapper;

class GraphicBuffer
    : public EGLNativeBase<
        android_native_buffer_t, 
        ANativeWindowBuffer,
        GraphicBuffer, 
        LightRefBase<GraphicBuffer> >, public Flattenable
{
@@ -74,8 +74,8 @@ public:
    GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage,
            uint32_t stride, native_handle_t* handle, bool keepOwnership);

    // create a buffer from an existing android_native_buffer_t
    GraphicBuffer(android_native_buffer_t* buffer, bool keepOwnership);
    // create a buffer from an existing ANativeWindowBuffer
    GraphicBuffer(ANativeWindowBuffer* buffer, bool keepOwnership);

    // return status
    status_t initCheck() const;
@@ -94,7 +94,7 @@ public:
    status_t lock(GGLSurface* surface, uint32_t usage);
    status_t unlock();

    android_native_buffer_t* getNativeBuffer() const;
    ANativeWindowBuffer* getNativeBuffer() const;
    
    void setIndex(int index);
    int getIndex() const;
@@ -149,7 +149,7 @@ private:

    // If we're wrapping another buffer then this reference will make sure it
    // doesn't get freed.
    sp<android_native_buffer_t> mWrappedBuffer;
    sp<ANativeWindowBuffer> mWrappedBuffer;
};

}; // namespace android
Loading