diff options
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
| -rw-r--r-- | libs/gui/ISurfaceTexture.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceTexture.cpp b/libs/gui/ISurfaceTexture.cpp index 90bca3ca4bad..d661fd57914e 100644 --- a/libs/gui/ISurfaceTexture.cpp +++ b/libs/gui/ISurfaceTexture.cpp @@ -38,6 +38,7 @@ enum { CANCEL_BUFFER, SET_CROP, SET_TRANSFORM, + GET_ALLOCATOR, }; @@ -123,6 +124,13 @@ public: status_t result = reply.readInt32(); return result; } + + virtual sp<IBinder> getAllocator() { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); + remote()->transact(GET_ALLOCATOR, data, &reply); + return reply.readStrongBinder(); + } }; IMPLEMENT_META_INTERFACE(SurfaceTexture, "android.gui.SurfaceTexture"); @@ -195,6 +203,12 @@ status_t BnSurfaceTexture::onTransact( reply->writeInt32(result); return NO_ERROR; } break; + case GET_ALLOCATOR: { + CHECK_INTERFACE(ISurfaceTexture, data, reply); + sp<IBinder> result = getAllocator(); + reply->writeStrongBinder(result); + return NO_ERROR; + } break; } return BBinder::onTransact(code, data, reply, flags); } |