diff options
author | Chih-Chung Chang <chihchung@google.com> | 2011-08-25 14:00:18 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2011-08-25 14:03:28 +0800 |
commit | aef59c544429aae73429a1325d43e830600e3b67 (patch) | |
tree | f9e67ba30ddf84e24d2adb166c2820d98e7a2882 | |
parent | 16ecf765405a22118e9d3bd2d3c22df374794dcf (diff) | |
download | frameworks_av-aef59c544429aae73429a1325d43e830600e3b67.zip frameworks_av-aef59c544429aae73429a1325d43e830600e3b67.tar.gz frameworks_av-aef59c544429aae73429a1325d43e830600e3b67.tar.bz2 |
Fix 5180429: Initialize native window transform to 0.
Change-Id: I2730895059d408fa731dc4ca8da3f7984fe196ae
-rwxr-xr-x | libvideoeditor/lvpp/PreviewRenderer.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libvideoeditor/lvpp/PreviewRenderer.cpp b/libvideoeditor/lvpp/PreviewRenderer.cpp index 63eceef..59ac712 100755 --- a/libvideoeditor/lvpp/PreviewRenderer.cpp +++ b/libvideoeditor/lvpp/PreviewRenderer.cpp @@ -49,25 +49,27 @@ PreviewRenderer::PreviewRenderer( int PreviewRenderer::init() { int err = 0; + ANativeWindow* anw = mSurface.get(); - err = native_window_api_connect(mSurface.get(), NATIVE_WINDOW_API_CPU); + err = native_window_api_connect(anw, NATIVE_WINDOW_API_CPU); if (err) goto fail; - err = native_window_set_usage(mSurface.get(), - GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN); + err = native_window_set_usage( + anw, GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_OFTEN); if (err) goto fail; - err = native_window_set_buffer_count(mSurface.get(), 3); + err = native_window_set_buffer_count(anw, 3); if (err) goto fail; err = native_window_set_scaling_mode( - mSurface.get(), NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); + anw, NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW); if (err) goto fail; err = native_window_set_buffers_geometry( - mSurface.get(), - mWidth, mHeight, - HAL_PIXEL_FORMAT_YV12); + anw, mWidth, mHeight, HAL_PIXEL_FORMAT_YV12); + if (err) goto fail; + + err = native_window_set_buffers_transform(anw, 0); if (err) goto fail; fail: |