diff options
author | Pierre Couillaud <pierre@broadcom.com> | 2014-07-03 10:55:00 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2014-07-07 13:13:38 -0700 |
commit | c09cec7ba6df108b91d9d9583b340580bafa5d0b (patch) | |
tree | 27264007890e4a178b78013ad888220ba9640eb2 /services/camera/libcameraservice/device1 | |
parent | 7f44751f95e722f7c628652bdacfa2bb5f510591 (diff) | |
download | frameworks_av-c09cec7ba6df108b91d9d9583b340580bafa5d0b.zip frameworks_av-c09cec7ba6df108b91d9d9583b340580bafa5d0b.tar.gz frameworks_av-c09cec7ba6df108b91d9d9583b340580bafa5d0b.tar.bz2 |
av: native_window_set_buffers_geometry is deprecated.
native_window_set_buffers_geometry is deprecated, but
__set_buffers_geometry is still used for device1 camera
support.
replace deprecated call with its equivalent combination of
native_window_set_buffers_dimensions and
native_window_set_buffers_format.
Change-Id: I4940367dcae6049451508bfdfc11c16907ec1afc
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Diffstat (limited to 'services/camera/libcameraservice/device1')
-rw-r--r-- | services/camera/libcameraservice/device1/CameraHardwareInterface.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/device1/CameraHardwareInterface.h b/services/camera/libcameraservice/device1/CameraHardwareInterface.h index 925b645..2746f6f 100644 --- a/services/camera/libcameraservice/device1/CameraHardwareInterface.h +++ b/services/camera/libcameraservice/device1/CameraHardwareInterface.h @@ -625,9 +625,14 @@ private: static int __set_buffers_geometry(struct preview_stream_ops* w, int width, int height, int format) { + int rc; ANativeWindow *a = anw(w); - return native_window_set_buffers_geometry(a, - width, height, format); + + rc = native_window_set_buffers_dimensions(a, width, height); + if (!rc) { + rc = native_window_set_buffers_format(a, format); + } + return rc; } static int __set_crop(struct preview_stream_ops *w, |