diff options
Diffstat (limited to 'test/CameraHal/camera_test_surfacetexture.cpp')
-rw-r--r-- | test/CameraHal/camera_test_surfacetexture.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CameraHal/camera_test_surfacetexture.cpp b/test/CameraHal/camera_test_surfacetexture.cpp index de50950..af9c904 100644 --- a/test/CameraHal/camera_test_surfacetexture.cpp +++ b/test/CameraHal/camera_test_surfacetexture.cpp @@ -328,9 +328,15 @@ void GLSurface::initialize(int display) { if (display) { mComposerClient = new SurfaceComposerClient; ASSERT(NO_ERROR == mComposerClient->initCheck()); +#ifdef ANDROID_API_JB_MR1_OR_LATER + mSurfaceControl = mComposerClient->createSurface( + String8("Test Surface"), + 800, 480, HAL_PIXEL_FORMAT_YCrCb_420_SP, 0); +#else mSurfaceControl = mComposerClient->createSurface( String8("Test Surface"), 0, 800, 480, HAL_PIXEL_FORMAT_YCrCb_420_SP, 0); +#endif ASSERT(mSurfaceControl != NULL); ASSERT(mSurfaceControl->isValid()); @@ -787,7 +793,11 @@ void BufferSourceInput::setInput(buffer_info_t bufinfo, const char *format, Shot void *src[3] = { 0 }; Rect bounds(aligned_width, aligned_height); +#ifdef ANDROID_API_JB_MR1_OR_LATER + mWindowTapIn->dequeueBuffer_DEPRECATED(mWindowTapIn.get(), &anb); +#else mWindowTapIn->dequeueBuffer(mWindowTapIn.get(), &anb); +#endif mapper.lock(anb->handle, GRALLOC_USAGE_SW_WRITE_OFTEN, bounds, dest); // copy buffer to input buffer if available if (bufinfo.buf.get()) { @@ -831,7 +841,11 @@ void BufferSourceInput::setInput(buffer_info_t bufinfo, const char *format, Shot anb = bufinfo.buf->getNativeBuffer(); } +#ifdef ANDROID_API_JB_MR1_OR_LATER + mWindowTapIn->queueBuffer_DEPRECATED(mWindowTapIn.get(), anb); +#else mWindowTapIn->queueBuffer(mWindowTapIn.get(), anb); +#endif #ifndef ANDROID_API_JB_OR_LATER { |