commit | f10d7fde03218c17251416a34d7b726a43ec528a | [log] [tgz] |
---|---|---|
author | Mathias Agopian <mathias@google.com> | Fri May 21 14:19:50 2010 -0700 |
committer | Mathias Agopian <mathias@google.com> | Fri May 21 14:34:32 2010 -0700 |
tree | 4a3cc07b0b73c47fcb875e0e3e5e64c8318504cc | |
parent | 3e23593d2f93e4449e22fdc0c9614cd119929084 [diff] [blame] |
added native_window_set_buffer_count() this method can be used to change the number of buffers associated to a native window. the default is two. Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
diff --git a/libs/surfaceflinger_client/SharedBufferStack.cpp b/libs/surfaceflinger_client/SharedBufferStack.cpp index 5deeabb..e2e1591 100644 --- a/libs/surfaceflinger_client/SharedBufferStack.cpp +++ b/libs/surfaceflinger_client/SharedBufferStack.cpp
@@ -463,6 +463,9 @@ if (uint32_t(bufferCount) >= SharedBufferStack::NUM_BUFFER_MAX) return BAD_VALUE; + if (uint32_t(bufferCount) < SharedBufferStack::NUM_BUFFER_MIN) + return BAD_VALUE; + RWLock::AutoWLock _wr(mLock); status_t err = ipc(bufferCount);