summaryrefslogtreecommitdiff
path: root/include/gui/SurfaceTextureClient.h
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2011-02-02 15:31:47 -0800
committer Jamie Gennis <jgennis@google.com> 2011-02-02 15:31:47 -0800
commit83bac216a7ba8493a7916e40b2555e73c3a5cc1a (patch)
treeff57384d2f89f0dd958add05408179b537dc973f /include/gui/SurfaceTextureClient.h
parentb799314e64d5afe050aeee394f0c29d7728c1e22 (diff)
Pass the IGraphicBufferAlloc to SurfaceTextureClient.
This change passes a reference to the IGraphicBufferAlloc binder object to SurfaceTextureClient objects. When STC objects are created they query their associated ISurfaceTexture object for the IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers. Having the SurfaceTextureClient hold this reference prevents the GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers before the SurfaceTextureClient is done with them. Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c related-bug: 3362519
Diffstat (limited to 'include/gui/SurfaceTextureClient.h')
-rw-r--r--include/gui/SurfaceTextureClient.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h
index dd1d490aebb9..ff2251d893a8 100644
--- a/include/gui/SurfaceTextureClient.h
+++ b/include/gui/SurfaceTextureClient.h
@@ -83,6 +83,10 @@ private:
// interactions with the server using this interface.
sp<ISurfaceTexture> mSurfaceTexture;
+ // mAllocator is the binder object that is referenced to prevent the
+ // dequeued buffers from being freed prematurely.
+ sp<IBinder> mAllocator;
+
// mSlots stores the buffers that have been allocated for each buffer slot.
// It is initialized to null pointers, and gets filled in with the result of
// ISurfaceTexture::requestBuffer when the client dequeues a buffer from a