From c5f94d8a4779050125145396ca83fbc862c7ed6b Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Fri, 18 Feb 2011 11:02:42 -0800 Subject: Add support for timestamps into SurfaceTexture. API addition: The timestamps are represented as nanoseconds from some arbitrary time point. Like the SurfaceTexture transform matrix, the timestamp retrieved by getTimestamp is for the last frame sent to the GL texture using updateTexImage(). Camera HAL change: Expect vendors to set these timestamps using native_window_set_buffers_timestamp(). For now, they are autogenerated by SurfaceTextureClient if set_buffers_timestamp() is never called, but such timing is likely not accurate enough to pass a CTS test. bug:3300707 Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7 --- include/surfaceflinger/Surface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/surfaceflinger') diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index 9e0b5bb..a59d9e5 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -226,7 +226,8 @@ private: int dispatch_set_buffer_count(va_list args); int dispatch_set_buffers_geometry(va_list args); int dispatch_set_buffers_transform(va_list args); - + int dispatch_set_buffers_timestamp(va_list args); + void setUsage(uint32_t reqUsage); int connect(int api); int disconnect(int api); @@ -234,6 +235,7 @@ private: int setBufferCount(int bufferCount); int setBuffersGeometry(int w, int h, int format); int setBuffersTransform(int transform); + int setBuffersTimestamp(int64_t timestamp); /* * private stuff... -- cgit v1.1