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

Commit 544f89ae authored by Teng-Hui Zhu's avatar Teng-Hui Zhu Committed by Jean-Baptiste Queru
Browse files

Update SurfaceTexture interface for forward compatibility

Change-Id: I32d224428c0127800714a976b4d7bb68cc7c2464
parent c70e89e2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@ namespace android {
class IGraphicBufferAlloc;
class String8;

class BufferQueue : public RefBase {
public:
    BufferQueue(bool allowSynchronousMode) {};
    status_t setBufferCount(int bufferCount) { return 0; }
};

class SurfaceTexture : public BnSurfaceTexture {
public:
    enum { MIN_UNDEQUEUED_BUFFERS = 2 };
@@ -69,7 +75,8 @@ public:
    // fences should be used to synchronize access to buffers if that behavior
    // is enabled at compile-time.
    SurfaceTexture(GLuint tex, bool allowSynchronousMode = true,
            GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true);
            GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true,
            const sp<BufferQueue> &bufferQueue = 0);

    virtual ~SurfaceTexture();

+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ static int32_t createProcessUniqueId() {
}

SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode,
        GLenum texTarget, bool useFenceSync) :
        GLenum texTarget, bool useFenceSync, const sp<BufferQueue> &bufferQueue) :
    mDefaultWidth(1),
    mDefaultHeight(1),
    mPixelFormat(PIXEL_FORMAT_RGBA_8888),