summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-02-05 01:49:16 -0800
committer Mathias Agopian <mathias@google.com> 2012-02-05 01:49:16 -0800
commitcf7f0c7328a02b68259c791752944113a1796b6c (patch)
treed0f6ebf315598ea30f6ecdb1963fa164e0d8af68 /services/surfaceflinger/Layer.cpp
parent077f29f8aeca3e79005abef0ee3642b8cb21da79 (diff)
ui freeze workaround: reenable triple buffering mode
we're seeing UI freezes when window updates and composition are separated. for now we workaround this by always doing a composition after window updates on vsync. triple buffering is reenabled for performance. Change-Id: I693d705000b7452489bb0b4918fbeadb9879315c
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 64f72d5c8714..3e6b8725248d 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -98,7 +98,12 @@ void Layer::onFirstRef()
mSurfaceTexture = new SurfaceTextureLayer(mTextureName, this);
mSurfaceTexture->setFrameAvailableListener(new FrameQueuedListener(this));
mSurfaceTexture->setSynchronousMode(true);
+#ifdef USE_TRIPLE_BUFFERING
+#warning "using triple buffering"
+ mSurfaceTexture->setBufferCountServer(3);
+#else
mSurfaceTexture->setBufferCountServer(2);
+#endif
}
Layer::~Layer()