diff options
| author | 2011-02-27 14:10:20 -0800 | |
|---|---|---|
| committer | 2011-02-28 12:24:40 -0800 | |
| commit | 9d4d6c101d90d4a1d1ca9413cf3eb89d1f1898d6 (patch) | |
| tree | 0942023183333661cfad18434702b533213a89cd /libs/gui/SurfaceTexture.cpp | |
| parent | 2e158a769d3903750f3f3e1ae0c8a980f8c16038 (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 223cf091e7..3bed959861 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; |