summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-10 19:40:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-10 19:40:48 -0700
commit875dee4e126db967b69bbfe8be323d1562d08282 (patch)
treec9ef05df8cf548251a97d675a692b89d36a3b6cf /include
parent379eac24740374552eed03db7d7e1a1ee3011a2a (diff)
parent5c71575983e96e6e4c5149e7e39d92f760f5c1fc (diff)
downloadframeworks_base-875dee4e126db967b69bbfe8be323d1562d08282.zip
frameworks_base-875dee4e126db967b69bbfe8be323d1562d08282.tar.gz
frameworks_base-875dee4e126db967b69bbfe8be323d1562d08282.tar.bz2
Merge changes I5174a6ec,I1f8538b6,Idb71fdcf
* changes: fix a crasher in SurfaceTexture::updateTexImage() rework dequeueBuffer()'s main loop. error out when SurfaceTexture APIs are called while not connected
Diffstat (limited to 'include')
-rw-r--r--include/gui/SurfaceTexture.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index 3f9e68d..a6fb12e 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -208,9 +208,28 @@ public:
protected:
- // freeAllBuffers frees the resources (both GraphicBuffer and EGLImage) for
- // all slots.
- void freeAllBuffers();
+ // freeBufferLocked frees the resources (both GraphicBuffer and EGLImage)
+ // for the given slot.
+ void freeBufferLocked(int index);
+
+ // freeAllBuffersLocked frees the resources (both GraphicBuffer and
+ // EGLImage) for all slots.
+ void freeAllBuffersLocked();
+
+ // freeAllBuffersExceptHeadLocked frees the resources (both GraphicBuffer
+ // and EGLImage) for all slots except the head of mQueue
+ void freeAllBuffersExceptHeadLocked();
+
+ // drainQueueLocked drains the buffer queue if we're in synchronous mode
+ // returns immediately otherwise. return NO_INIT if SurfaceTexture
+ // became abandoned or disconnected during this call.
+ status_t drainQueueLocked();
+
+ // drainQueueAndFreeBuffersLocked drains the buffer queue if we're in
+ // synchronous mode and free all buffers. In asynchronous mode, all buffers
+ // are freed except the current buffer.
+ status_t drainQueueAndFreeBuffersLocked();
+
static bool isExternalFormat(uint32_t format);
private: