summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISurfaceTexture.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-04-20 14:20:59 -0700
committerMathias Agopian <mathias@google.com>2011-05-11 18:01:51 -0700
commited3894c07a67b3e35d07084c4a8b410908bfedc5 (patch)
treed6be3a0f844843e230bf10e285896d3a6336e167 /libs/gui/ISurfaceTexture.cpp
parent0297dcae8fddb18ab9e28ba1858a57a8aec3ef32 (diff)
downloadframeworks_base-ed3894c07a67b3e35d07084c4a8b410908bfedc5.zip
frameworks_base-ed3894c07a67b3e35d07084c4a8b410908bfedc5.tar.gz
frameworks_base-ed3894c07a67b3e35d07084c4a8b410908bfedc5.tar.bz2
unify SurfaceTexture and Surface
Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
-rw-r--r--libs/gui/ISurfaceTexture.cpp21
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);
}