summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2011-06-10 16:05:23 -0700
committerIliyan Malchev <malchev@google.com>2011-06-11 11:02:38 -0700
commitafcedc9e6f17d8213d9bd8f6c36643dcc816d0ef (patch)
treed36ad40b3c4ca6758c09a31d216252b9c0a23460 /services
parentaaf95a50b2202acb14fa437d065afc611a9265ff (diff)
downloadframeworks_av-afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef.zip
frameworks_av-afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef.tar.gz
frameworks_av-afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef.tar.bz2
CameraService: return stide when dequeueing a buffer
Change-Id: I11c7f0b57f7d619cdc392b2d34c538ae898de7ac Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 7a18831..a3749cf 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -552,7 +552,7 @@ private:
#define anw(n) __to_anw(((struct camera_preview_window *)n)->user)
static int __dequeue_buffer(struct preview_stream_ops* w,
- buffer_handle_t** buffer)
+ buffer_handle_t** buffer, int *stride)
{
int rc;
ANativeWindow *a = anw(w);
@@ -560,8 +560,10 @@ private:
rc = a->dequeueBuffer(a, &anb);
if (!rc) {
rc = a->lockBuffer(a, anb);
- if (!rc)
+ if (!rc) {
*buffer = &anb->handle;
+ *stride = anb->stride;
+ }
else
a->cancelBuffer(a, anb);
}