diff options
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
| -rw-r--r-- | libs/gui/ISurfaceTexture.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceTexture.cpp b/libs/gui/ISurfaceTexture.cpp index 44c78ca..0bd0f97 100644 --- a/libs/gui/ISurfaceTexture.cpp +++ b/libs/gui/ISurfaceTexture.cpp @@ -39,6 +39,7 @@ enum { SET_CROP, SET_TRANSFORM, GET_ALLOCATOR, + QUERY, }; @@ -132,6 +133,17 @@ public: remote()->transact(GET_ALLOCATOR, data, &reply); return reply.readStrongBinder(); } + + virtual int query(int what, int* value) { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); + data.writeInt32(what); + remote()->transact(QUERY, data, &reply); + value[0] = reply.readInt32(); + status_t result = reply.readInt32(); + return result; + } + }; IMPLEMENT_META_INTERFACE(SurfaceTexture, "android.gui.SurfaceTexture"); @@ -209,6 +221,15 @@ status_t BnSurfaceTexture::onTransact( reply->writeStrongBinder(result); return NO_ERROR; } break; + case QUERY: { + CHECK_INTERFACE(ISurfaceTexture, data, reply); + int value; + int what = data.readInt32(); + int res = query(what, &value); + reply->writeInt32(value); + reply->writeInt32(res); + return NO_ERROR; + } break; } return BBinder::onTransact(code, data, reply, flags); } |
