diff options
author | Kevin Bruckert <agrabren@yahoo.com> | 2012-11-20 05:00:03 -0800 |
---|---|---|
committer | Dorian Snyder <dastin1015@gmail.com> | 2013-04-28 21:17:55 -0700 |
commit | 86fc2992b5a91da8840637f90cf4453f75e44bf0 (patch) | |
tree | c0b3aa306fba2c3cf2650a69703a5962303e0009 | |
parent | 347e17240adf07ec02d7ae1adab89a18b7e77187 (diff) | |
download | hardware_libhardware-86fc2992b5a91da8840637f90cf4453f75e44bf0.zip hardware_libhardware-86fc2992b5a91da8840637f90cf4453f75e44bf0.tar.gz hardware_libhardware-86fc2992b5a91da8840637f90cf4453f75e44bf0.tar.bz2 |
Add camera parameters for htc evo 3D. (2/2)
Use BOARD_HTC_3D_SUPPORT to enable.
Change-Id: I23b668a7a5d88770cbc290940444f55f157630d3
-rw-r--r-- | include/hardware/camera.h | 3 | ||||
-rw-r--r-- | modules/gralloc/Android.mk | 4 | ||||
-rw-r--r-- | modules/gralloc/gralloc.cpp | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/hardware/camera.h b/include/hardware/camera.h index b7182f8..2cd17e1 100644 --- a/include/hardware/camera.h +++ b/include/hardware/camera.h @@ -75,6 +75,9 @@ typedef struct preview_stream_ops { int (*cancel_buffer)(struct preview_stream_ops* w, buffer_handle_t* buffer); int (*set_buffer_count)(struct preview_stream_ops* w, int count); +#ifdef HTC_3D_SUPPORT + int (*set_3d_mode)(const struct preview_stream_ops *w, int r1, int r2, int r3); +#endif int (*set_buffers_geometry)(struct preview_stream_ops* pw, int w, int h, int format); int (*set_crop)(struct preview_stream_ops *w, diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk index b24c4cd..bfc401b 100644 --- a/modules/gralloc/Android.mk +++ b/modules/gralloc/Android.mk @@ -30,4 +30,8 @@ LOCAL_SRC_FILES := \ LOCAL_MODULE := gralloc.default LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" +ifeq ($(BOARD_HTC_3D_SUPPORT),true) + LOCAL_CFLAGS += -DHTC_3D_SUPPORT +endif + include $(BUILD_SHARED_LIBRARY) diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index 99aeb01..796948d 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -208,6 +208,11 @@ static int gralloc_alloc(alloc_device_t* dev, int align = 4; int bpp = 0; switch (format) { +#ifdef HTC_3D_SUPPORT // HTC uses mode 96 for 3D camera + case 96: + bpp = 4; + break; +#endif case HAL_PIXEL_FORMAT_RGBA_8888: case HAL_PIXEL_FORMAT_RGBX_8888: case HAL_PIXEL_FORMAT_BGRA_8888: |