am e3b05d09: Merge "Tweaks for forward-compatibility"

* commit 'e3b05d09163257b888c86f2a560e10c48f4cf029':
  Tweaks for forward-compatibility
This commit is contained in:
Jean-Baptiste Queru 2011-06-20 09:05:07 -07:00 committed by Android Git Automerger
commit 75e3e4936b
4 changed files with 17 additions and 0 deletions

View File

@ -28,6 +28,7 @@ struct SurfaceTexture {
void incStrong(android::sp<android::SurfaceTexture>* const) {}
void getTransformMatrix(float mtx[16]) {}
void setFrameAvailableListener(const sp<FrameAvailableListener>&) {}
void setSynchronousMode(bool) {}
};
static sp<SurfaceTexture> SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz)

View File

@ -74,6 +74,8 @@ public:
GraphicBuffer();
GraphicBuffer(android_native_buffer_t*, bool);
// creates w * h buffer
GraphicBuffer(uint32_t w, uint32_t h, PixelFormat format, uint32_t usage);

View File

@ -63,6 +63,7 @@ typedef struct android_native_buffer_t
void* reserved_proc[8];
} android_native_buffer_t;
#define ANativeWindowBuffer android_native_buffer_t
/*****************************************************************************/

View File

@ -49,6 +49,19 @@ GraphicBuffer::GraphicBuffer()
handle = NULL;
}
GraphicBuffer::GraphicBuffer(android_native_buffer_t*, bool)
: BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
mInitCheck(NO_ERROR), mIndex(-1)
{
width =
height =
stride =
format =
usage = 0;
transform = 0;
handle = NULL;
}
GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h,
PixelFormat reqFormat, uint32_t reqUsage)
: BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),