Skip to content

Commit 544f89a

Browse files
Teng-Hui ZhuJean-Baptiste Queru
authored andcommitted
Update SurfaceTexture interface for forward compatibility
Change-Id: I32d224428c0127800714a976b4d7bb68cc7c2464
1 parent c70e89e commit 544f89a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

include/gui/SurfaceTexture.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ namespace android {
3838
class IGraphicBufferAlloc;
3939
class String8;
4040

41+
class BufferQueue : public RefBase {
42+
public:
43+
BufferQueue(bool allowSynchronousMode) {};
44+
status_t setBufferCount(int bufferCount) { return 0; }
45+
};
46+
4147
class SurfaceTexture : public BnSurfaceTexture {
4248
public:
4349
enum { MIN_UNDEQUEUED_BUFFERS = 2 };
@@ -69,7 +75,8 @@ class SurfaceTexture : public BnSurfaceTexture {
6975
// fences should be used to synchronize access to buffers if that behavior
7076
// is enabled at compile-time.
7177
SurfaceTexture(GLuint tex, bool allowSynchronousMode = true,
72-
GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true);
78+
GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, bool useFenceSync = true,
79+
const sp<BufferQueue> &bufferQueue = 0);
7380

7481
virtual ~SurfaceTexture();
7582

libs/gui/SurfaceTexture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int32_t createProcessUniqueId() {
115115
}
116116

117117
SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode,
118-
GLenum texTarget, bool useFenceSync) :
118+
GLenum texTarget, bool useFenceSync, const sp<BufferQueue> &bufferQueue) :
119119
mDefaultWidth(1),
120120
mDefaultHeight(1),
121121
mPixelFormat(PIXEL_FORMAT_RGBA_8888),

0 commit comments

Comments
 (0)