summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-03-14 19:18:13 -0700
committerMathias Agopian <mathias@google.com>2013-03-14 19:18:13 -0700
commit6710604286401d4205c27235a252dd0e5008cc08 (patch)
tree1b26afab83944524538011e17ef21eed104aa901 /services/surfaceflinger/Layer.cpp
parent5b00af2435d67ccf806c918f6482949870fd993b (diff)
downloadframeworks_native-6710604286401d4205c27235a252dd0e5008cc08.zip
frameworks_native-6710604286401d4205c27235a252dd0e5008cc08.tar.gz
frameworks_native-6710604286401d4205c27235a252dd0e5008cc08.tar.bz2
get rid of purgatory and fix QueuesToWindowComposer query
the purgatory list wasn't needed anymore; in fact it had no effect as buffer life-time management is now handled by the BufferQueue. For QueuesToWindowComposer we keep a list of wp<> on the IBinder for IGraphicBufferProducers we hand over to clients so we can easily check if an IGraphicBufferProducer is ours. We clean-up the list when our IGraphicBufferProducer are destroyed. Bug: 8349142 Change-Id: I1aa06652ade8c72d0004a3f5e6c3d6e8a82fc2ae
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 5996c90..1677c76 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -108,7 +108,7 @@ Layer::Layer(SurfaceFlinger* flinger, const sp<Client>& client,
void Layer::onFirstRef()
{
// Creates a custom BufferQueue for SurfaceFlingerConsumer to use
- sp<BufferQueue> bq = new SurfaceTextureLayer();
+ sp<BufferQueue> bq = new SurfaceTextureLayer(mFlinger);
mSurfaceFlingerConsumer = new SurfaceFlingerConsumer(mTextureName, true,
GL_TEXTURE_EXTERNAL_OES, false, bq);
@@ -153,8 +153,9 @@ void Layer::onFrameAvailable() {
mFlinger->signalLayerUpdate();
}
-// called with SurfaceFlinger::mStateLock as soon as the layer is entered
-// in the purgatory list
+// called with SurfaceFlinger::mStateLock from the drawing thread after
+// the layer has been remove from the current state list (and just before
+// it's removed from the drawing state list)
void Layer::onRemoved() {
mSurfaceFlingerConsumer->abandon();
}