diff options
author | Jamie Gennis <jgennis@google.com> | 2010-11-11 15:26:21 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-11 15:26:21 -0800 |
commit | 7ab17a3426d3565f72c6832bb650d1709cbf52cf (patch) | |
tree | 90e188808e39d3447b880ca20cac6b2fad137921 /libs/surfaceflinger_client/Surface.cpp | |
parent | e1ccfb7f6e63f639988d9b50f060612f96c49c3f (diff) | |
parent | 6c925d00e131e40811897e0ddc332d6f5bc83178 (diff) | |
download | frameworks_base-7ab17a3426d3565f72c6832bb650d1709cbf52cf.zip frameworks_base-7ab17a3426d3565f72c6832bb650d1709cbf52cf.tar.gz frameworks_base-7ab17a3426d3565f72c6832bb650d1709cbf52cf.tar.bz2 |
Merge "Implement reducing the buffer count of a Surface."
Diffstat (limited to 'libs/surfaceflinger_client/Surface.cpp')
-rw-r--r-- | libs/surfaceflinger_client/Surface.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index c1e00ca..9467a4c 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -855,6 +855,12 @@ int Surface::setBufferCount(int bufferCount) status_t err = mSharedBufferClient->setBufferCount(bufferCount, ipc); LOGE_IF(err, "ISurface::setBufferCount(%d) returned %s", bufferCount, strerror(-err)); + + if (err == NO_ERROR) { + // Clear out any references to the old buffers. + mBuffers.clear(); + } + return err; } |