summaryrefslogtreecommitdiff
path: root/libs/ui/ISurface.cpp
diff options
context:
space:
mode:
author Fred Quintana <fredq@google.com> 2009-08-11 20:49:35 -0700
committer Fred Quintana <fredq@google.com> 2009-08-11 20:49:35 -0700
commitb2fd4665e66fe81969f1f07fd724c6f68dd8f7f1 (patch)
tree8564d48ba85748bdb281a3bcda22b41ed17c72e8 /libs/ui/ISurface.cpp
parent01b535185805d5b22c5fffc30833decdca308b5b (diff)
Revert "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
Diffstat (limited to 'libs/ui/ISurface.cpp')
-rw-r--r--libs/ui/ISurface.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/ui/ISurface.cpp b/libs/ui/ISurface.cpp
index b78e8b5ab5..9fbae1ebaf 100644
--- a/libs/ui/ISurface.cpp
+++ b/libs/ui/ISurface.cpp
@@ -71,11 +71,10 @@ public:
{
}
- virtual sp<SurfaceBuffer> getBuffer(int usage)
+ virtual sp<SurfaceBuffer> getBuffer()
{
Parcel data, reply;
data.writeInterfaceToken(ISurface::getInterfaceDescriptor());
- data.writeInt32(usage);
remote()->transact(GET_BUFFER, data, &reply);
sp<SurfaceBuffer> buffer = new SurfaceBuffer(reply);
return buffer;
@@ -136,8 +135,7 @@ status_t BnSurface::onTransact(
switch(code) {
case GET_BUFFER: {
CHECK_INTERFACE(ISurface, data, reply);
- int usage = data.readInt32();
- sp<SurfaceBuffer> buffer(getBuffer(usage));
+ sp<SurfaceBuffer> buffer(getBuffer());
return SurfaceBuffer::writeToParcel(reply, buffer.get());
}
case REGISTER_BUFFERS: {