summaryrefslogtreecommitdiffstats
path: root/native/android
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2012-04-11 18:52:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-11 18:52:12 -0700
commit544f1c334c603fad888037c9f2a595faaf2479cc (patch)
tree3bf565fef0cb6c9c3eb17bfc354787a1b4ba15f9 /native/android
parentb990893ffc591bc7de9d5fd54dbe1707388717a8 (diff)
parent0e5ed706a2a7c85ddb11bcac55a6e210f725c3f9 (diff)
downloadframeworks_base-544f1c334c603fad888037c9f2a595faaf2479cc.zip
frameworks_base-544f1c334c603fad888037c9f2a595faaf2479cc.tar.gz
frameworks_base-544f1c334c603fad888037c9f2a595faaf2479cc.tar.bz2
Merge "ANativeWindow: support for application buffer dimensions"
Diffstat (limited to 'native/android')
-rw-r--r--native/android/native_window.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/native/android/native_window.cpp b/native/android/native_window.cpp
index c58ee00..99c0fd3 100644
--- a/native/android/native_window.cpp
+++ b/native/android/native_window.cpp
@@ -60,13 +60,16 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window) {
int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width,
int32_t height, int32_t format) {
- int32_t err = native_window_set_buffers_geometry(window, width, height, format);
+ int32_t err = native_window_set_buffers_format(window, format);
if (!err) {
- int mode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
- if (width && height) {
- mode = NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW;
- }
- err = native_window_set_scaling_mode(window, mode);
+ err = native_window_set_buffers_user_dimensions(window, width, height);
+ if (!err) {
+ int mode = NATIVE_WINDOW_SCALING_MODE_FREEZE;
+ if (width && height) {
+ mode = NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW;
+ }
+ err = native_window_set_scaling_mode(window, mode);
+ }
}
return err;
}