diff options
author | Mathias Agopian <mathias@google.com> | 2012-05-29 19:53:52 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-29 19:53:52 -0700 |
commit | 2466e402a054669ecda0d2b0dcb9cc08c4a9559a (patch) | |
tree | 436d0e97446b87806ff52504b93a57196f0265f1 /include | |
parent | 9f36ebdb5b68d680e13814fd5712c0d4ab9488ff (diff) | |
parent | 584fcb3218e07d7b4cc0aeaef41faa4e891b45a4 (diff) | |
download | frameworks_native-2466e402a054669ecda0d2b0dcb9cc08c4a9559a.zip frameworks_native-2466e402a054669ecda0d2b0dcb9cc08c4a9559a.tar.gz frameworks_native-2466e402a054669ecda0d2b0dcb9cc08c4a9559a.tar.bz2 |
am 584fcb32: am 2c8207e9: add the ability to reject buffers in SurfaceTexture::updateTexImage
* commit '584fcb3218e07d7b4cc0aeaef41faa4e891b45a4':
add the ability to reject buffers in SurfaceTexture::updateTexImage
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/SurfaceTexture.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index f9cf0be..2635e2f 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -236,6 +236,19 @@ protected: static bool isExternalFormat(uint32_t format); private: + // this version of updateTexImage() takes a functor used to reject or not + // the newly acquired buffer. + // this API is TEMPORARY and intended to be used by SurfaceFlinger only, + // which is why class Layer is made a friend of SurfaceTexture below. + class BufferRejecter { + friend class SurfaceTexture; + virtual bool reject(const sp<GraphicBuffer>& buf, + const BufferQueue::BufferItem& item) = 0; + protected: + virtual ~BufferRejecter() { } + }; + friend class Layer; + status_t updateTexImage(BufferRejecter* rejecter); // createImage creates a new EGLImage from a GraphicBuffer. EGLImageKHR createImage(EGLDisplay dpy, |