summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2013-11-19 14:11:26 -0500
committerSteve Kondik <shade@chemlab.org>2015-11-07 01:21:36 -0800
commitb9127bdbe39524de8e2219d1b1734d5d22d099c1 (patch)
tree7b692c7fb9f2ab26f4ebd90dc02088dd7b34593b
parent1cdd1b5ad204cb319174f86b522fcb0dc7968ed6 (diff)
downloadframeworks_native-b9127bdbe39524de8e2219d1b1734d5d22d099c1.zip
frameworks_native-b9127bdbe39524de8e2219d1b1734d5d22d099c1.tar.gz
frameworks_native-b9127bdbe39524de8e2219d1b1734d5d22d099c1.tar.bz2
surfaceflinger: Set max acquired buffer count
If triple framebuffers are enabled, the number of acquired buffers isn't increased by default. Set the count to one less than the max buffers to make sure all three buffers come into play. Change-Id: I8fae1b5564fbea598e415a86b0a21c3449c92d87
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index 6ef3295..70af656 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -67,6 +67,7 @@ FramebufferSurface::FramebufferSurface(HWComposer& hwc, int disp,
mConsumer->setDefaultBufferFormat(mHwc.getFormat(disp));
mConsumer->setDefaultBufferSize(mHwc.getWidth(disp), mHwc.getHeight(disp));
mConsumer->setDefaultMaxBufferCount(NUM_FRAMEBUFFER_SURFACE_BUFFERS);
+ mConsumer->setMaxAcquiredBufferCount(NUM_FRAMEBUFFER_SURFACE_BUFFERS - 1);
}
status_t FramebufferSurface::beginFrame(bool /*mustRecompose*/) {