From ea33819479ae5b53b80704c12a317b1555adbc97 Mon Sep 17 00:00:00 2001 From: Kevin Bruckert Date: Tue, 20 Nov 2012 04:48:00 -0800 Subject: Add camera parameters for htc evo 3D. (1/2) Use BOARD_HTC_3D_SUPPORT to enable. Change-Id: I28fa3f1586071bcc78b8e887bbbf699d338a0ceb --- services/camera/libcameraservice/Android.mk | 7 ++++++- services/camera/libcameraservice/CameraHardwareInterface.h | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/camera/libcameraservice/Android.mk b/services/camera/libcameraservice/Android.mk index 3e2ac14..7c770db 100644 --- a/services/camera/libcameraservice/Android.mk +++ b/services/camera/libcameraservice/Android.mk @@ -40,14 +40,19 @@ LOCAL_C_INCLUDES += \ system/media/camera/include \ external/jpeg + ifeq ($(BOARD_USES_QCOM_LEGACY_CAM_PARAMS),true) LOCAL_CFLAGS += -DQCOM_LEGACY_CAM_PARAMS endif -ifeq ($(BOARD_HAVE_HTC_FFC), true) +ifeq ($(BOARD_HAVE_HTC_FFC),true) LOCAL_CFLAGS += -DBOARD_HAVE_HTC_FFC endif +ifeq ($(BOARD_HTC_3D_SUPPORT),true) + LOCAL_CFLAGS += -DHTC_3D_SUPPORT +endif + LOCAL_MODULE:= libcameraservice include $(BUILD_SHARED_LIBRARY) 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; -- cgit v1.1