Update SurfaceTexture interface for forward compatibility
Change-Id: I32d224428c0127800714a976b4d7bb68cc7c2464
This commit is contained in:
committed by
Jean-Baptiste Queru
parent
c70e89e2a0
commit
544f89aece
@@ -38,6 +38,12 @@ namespace android {
|
|||||||
class IGraphicBufferAlloc;
|
class IGraphicBufferAlloc;
|
||||||
class String8;
|
class String8;
|
||||||
|
|
||||||
|
class BufferQueue : public RefBase {
|
||||||
|
public:
|
||||||
|
BufferQueue(bool allowSynchronousMode) {};
|
||||||
|
status_t setBufferCount(int bufferCount) { return 0; }
|
||||||
|
};
|
||||||
|
|
||||||
class SurfaceTexture : public BnSurfaceTexture {
|
class SurfaceTexture : public BnSurfaceTexture {
|
||||||
public:
|
public:
|
||||||
enum { MIN_UNDEQUEUED_BUFFERS = 2 };
|
enum { MIN_UNDEQUEUED_BUFFERS = 2 };
|
||||||
@@ -69,7 +75,8 @@ public:
|
|||||||
// fences should be used to synchronize access to buffers if that behavior
|
// fences should be used to synchronize access to buffers if that behavior
|
||||||
// is enabled at compile-time.
|
// is enabled at compile-time.
|
||||||
SurfaceTexture(GLuint tex, bool allowSynchronousMode = true,
|
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();
|
virtual ~SurfaceTexture();
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ static int32_t createProcessUniqueId() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode,
|
SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode,
|
||||||
GLenum texTarget, bool useFenceSync) :
|
GLenum texTarget, bool useFenceSync, const sp<BufferQueue> &bufferQueue) :
|
||||||
mDefaultWidth(1),
|
mDefaultWidth(1),
|
||||||
mDefaultHeight(1),
|
mDefaultHeight(1),
|
||||||
mPixelFormat(PIXEL_FORMAT_RGBA_8888),
|
mPixelFormat(PIXEL_FORMAT_RGBA_8888),
|
||||||
|
|||||||
Reference in New Issue
Block a user