diff options
| author | 2011-02-27 14:10:20 -0800 | |
|---|---|---|
| committer | 2011-02-28 12:24:40 -0800 | |
| commit | 96dcc978430f0daf6d73fee96a01779ed537a0ce (patch) | |
| tree | 683c5986dd007030e5a98e57aa6c0764d19da51b /libs/gui/SurfaceTexture.cpp | |
| parent | 8e79442c4fdabd2f82d0ed8e23d394816edee495 (diff) | |
Add the MIN_UNDEQUEUED_BUFFERS query to ANW.
This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.
Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
Diffstat (limited to 'libs/gui/SurfaceTexture.cpp')
| -rw-r--r-- | libs/gui/SurfaceTexture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 223cf091e7bd..3bed95986172 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -96,6 +96,11 @@ SurfaceTexture::~SurfaceTexture() { status_t SurfaceTexture::setBufferCount(int bufferCount) { LOGV("SurfaceTexture::setBufferCount"); + + if (bufferCount < MIN_BUFFER_SLOTS) { + return BAD_VALUE; + } + Mutex::Autolock lock(mMutex); freeAllBuffers(); mBufferCount = bufferCount; |