summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraHardwareInterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/camera/libcameraservice/CameraHardwareInterface.h')
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index d67996e..f7e7397 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -650,6 +650,9 @@ private:
static int __set_usage(struct preview_stream_ops* w, int usage)
{
+#ifdef HTC_3D_SUPPORT
+ usage |= GRALLOC_USAGE_PRIVATE_0;
+#endif
ANativeWindow *a = anw(w);
return native_window_set_usage(a, usage);
}
@@ -668,6 +671,14 @@ private:
return a->query(a, NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, count);
}
+#ifdef HTC_3D_SUPPORT
+ static int __set_3d_mode(
+ const struct preview_stream_ops *w, int r1, int r2, int r3)
+ {
+ return 0;
+ }
+#endif
+
void initHalPreviewWindow()
{
mHalPreviewWindow.nw.cancel_buffer = __cancel_buffer;
@@ -675,6 +686,9 @@ private:
mHalPreviewWindow.nw.dequeue_buffer = __dequeue_buffer;
mHalPreviewWindow.nw.enqueue_buffer = __enqueue_buffer;
mHalPreviewWindow.nw.set_buffer_count = __set_buffer_count;
+#ifdef HTC_3D_SUPPORT
+ mHalPreviewWindow.nw.set_3d_mode = __set_3d_mode;
+#endif
mHalPreviewWindow.nw.set_buffers_geometry = __set_buffers_geometry;
mHalPreviewWindow.nw.set_crop = __set_crop;
mHalPreviewWindow.nw.set_timestamp = __set_timestamp;