diff options
author | Jamie Gennis <jgennis@google.com> | 2011-02-27 14:10:20 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-02-28 12:24:40 -0800 |
commit | 96dcc978430f0daf6d73fee96a01779ed537a0ce (patch) | |
tree | 683c5986dd007030e5a98e57aa6c0764d19da51b /include/surfaceflinger | |
parent | 8e79442c4fdabd2f82d0ed8e23d394816edee495 (diff) | |
download | frameworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.zip frameworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.tar.gz frameworks_base-96dcc978430f0daf6d73fee96a01779ed537a0ce.tar.bz2 |
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 'include/surfaceflinger')
-rw-r--r-- | include/surfaceflinger/Surface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index d783caf..9e0b5bb 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -242,6 +242,10 @@ private: status_t validate(bool inCancelBuffer = false) const; sp<ISurface> getISurface() const; + // When the buffer pool is a fixed size we want to make sure SurfaceFlinger + // won't stall clients, so we require an extra buffer. + enum { MIN_UNDEQUEUED_BUFFERS = 2 }; + inline const GraphicBufferMapper& getBufferMapper() const { return mBufferMapper; } inline GraphicBufferMapper& getBufferMapper() { return mBufferMapper; } |