summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-07-18 16:15:08 -0700
committerMathias Agopian <mathias@google.com>2011-07-19 13:05:12 -0700
commit9bc7af17974f448291a44912566ec7472a0d798b (patch)
tree9df5ca7ddd582ba6d76478bb48982734ace645ad /services/camera/libcameraservice/CameraService.cpp
parent2e460c5b7f48aaabff33698ba6b11b04906eefa8 (diff)
downloadframeworks_av-9bc7af17974f448291a44912566ec7472a0d798b.zip
frameworks_av-9bc7af17974f448291a44912566ec7472a0d798b.tar.gz
frameworks_av-9bc7af17974f448291a44912566ec7472a0d798b.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.cpp4
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);
}