summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceTexture.cpp
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2011-02-02 16:21:24 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2011-02-02 16:21:24 -0800
commita257be1895218e5c3e153313db9dd703fd9cc84f (patch)
tree457726588b7e414388795ed24f1c38a67dc96dd6 /libs/gui/ISurfaceTexture.cpp
parent9d3fb3717f2acec71a3330e448ecf63ee997b1f8 (diff)
parent421d94c20321e1de528416b279bf148baba47b39 (diff)
am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit '421d94c20321e1de528416b279bf148baba47b39': Pass the IGraphicBufferAlloc to SurfaceTextureClient.
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
-rw-r--r--libs/gui/ISurfaceTexture.cpp14
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);
}