summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-07-26 14:06:07 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-01-10 17:05:52 -0800
commite95316d6e9fb374c36470f834a4171f6f23820b6 (patch)
tree28b961e8f67f41b75e92dee0bb5cab4121ac6086 /services/camera
parent2ddb4c85093384f55d74a58a8bc0b7ebf6b6b265 (diff)
downloadframeworks_base-e95316d6e9fb374c36470f834a4171f6f23820b6.zip
frameworks_base-e95316d6e9fb374c36470f834a4171f6f23820b6.tar.gz
frameworks_base-e95316d6e9fb374c36470f834a4171f6f23820b6.tar.bz2
Add ANativeWindow timestamp support to camera service.
This allows the camera HAL to set ANativeWindow timestamps, which are used by SurfaceTexture. Bug-Id: 5081132 Change-Id: I123ea4c9d1824fb72146fad81ad03d1491e0a7f8
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 34087b5..2ac69f7 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -635,6 +635,12 @@ private:
return native_window_set_crop(a, &crop);
}
+ static int __set_timestamp(struct preview_stream_ops *w,
+ int64_t timestamp) {
+ ANativeWindow *a = anw(w);
+ return native_window_set_buffers_timestamp(a, timestamp);
+ }
+
static int __set_usage(struct preview_stream_ops* w, int usage)
{
ANativeWindow *a = anw(w);
@@ -664,6 +670,7 @@ private:
mHalPreviewWindow.nw.set_buffer_count = __set_buffer_count;
mHalPreviewWindow.nw.set_buffers_geometry = __set_buffers_geometry;
mHalPreviewWindow.nw.set_crop = __set_crop;
+ mHalPreviewWindow.nw.set_timestamp = __set_timestamp;
mHalPreviewWindow.nw.set_usage = __set_usage;
mHalPreviewWindow.nw.set_swap_interval = __set_swap_interval;