Add method to create a ParcelSurfaceTexture from android.view.Surface.
Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
This commit is contained in:
parent
5299258ce2
commit
1e7fa9e945
@ -40,6 +40,7 @@ namespace android {
|
||||
class GraphicBuffer;
|
||||
class GraphicBufferMapper;
|
||||
class IOMX;
|
||||
class ISurfaceTexture;
|
||||
class Rect;
|
||||
class Surface;
|
||||
class SurfaceComposerClient;
|
||||
@ -154,6 +155,7 @@ public:
|
||||
bool isValid();
|
||||
uint32_t getFlags() const { return mFlags; }
|
||||
uint32_t getIdentity() const { return mIdentity; }
|
||||
sp<ISurfaceTexture> getSurfaceTexture();
|
||||
|
||||
// the lock/unlock APIs must be used from the same thread
|
||||
status_t lock(SurfaceInfo* info, bool blocking = true);
|
||||
|
@ -421,6 +421,10 @@ status_t Surface::validate(bool inCancelBuffer) const
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
sp<ISurfaceTexture> Surface::getSurfaceTexture() {
|
||||
return mSurface != NULL ? mSurface->getSurfaceTexture() : NULL;
|
||||
}
|
||||
|
||||
sp<IBinder> Surface::asBinder() const {
|
||||
return mSurface!=0 ? mSurface->asBinder() : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user