diff options
author | Mathias Agopian <mathias@google.com> | 2011-07-18 16:15:08 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-07-19 13:05:12 -0700 |
commit | ff86f37b95327538b97b6b8ef5d3c6ed0cd7f902 (patch) | |
tree | 59deccf2daa7d8c8167574cacf878a4ee279f149 /services/camera/libcameraservice/CameraService.cpp | |
parent | 09d7ed7b395d66be97c6bcb052039f5c0dce646c (diff) | |
download | frameworks_base-ff86f37b95327538b97b6b8ef5d3c6ed0cd7f902.zip frameworks_base-ff86f37b95327538b97b6b8ef5d3c6ed0cd7f902.tar.gz frameworks_base-ff86f37b95327538b97b6b8ef5d3c6ed0cd7f902.tar.bz2 |
use SurfaceTexture new scaling mode in SF
SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size
Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
Diffstat (limited to 'services/camera/libcameraservice/CameraService.cpp')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 0eff776..637ccd8 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -536,6 +536,8 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder, // If preview has been already started, register preview buffers now. if (mHardware->previewEnabled()) { if (window != 0) { + native_window_set_scaling_mode(window.get(), + NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); native_window_set_buffers_transform(window.get(), mOrientation); result = mHardware->setPreviewWindow(window); } @@ -642,6 +644,8 @@ status_t CameraService::Client::startPreviewMode() { } if (mPreviewWindow != 0) { + native_window_set_scaling_mode(mPreviewWindow.get(), + NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); native_window_set_buffers_transform(mPreviewWindow.get(), mOrientation); } |