am 544f89ae: Update SurfaceTexture interface for forward compatibility

* commit '544f89aece46e8f4bbe4eed93116c8736e68ac07':
  Update SurfaceTexture interface for forward compatibility
This commit is contained in:
Teng-Hui Zhu
2012-04-10 08:38:39 -07:00
committed by Android Git Automerger
2 changed files with 9 additions and 2 deletions

View File

@@ -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();

View File

@@ -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),