| commit | 25f0bdaea6d1a34aae3faf6688cad4fbebcca969 | [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 | 8600372f2cb6f54254d2c7e0f7018c039e07c4b6 | |
| parent | 4f5f2786b2c850ad0d772c7707ddbe55c3b7adf6 [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);