Implement usage IO INPUT
Change-Id: I4dedd697ecd7719ba307ac393aca5abd67128e0c
diff --git a/rsAllocation.cpp b/rsAllocation.cpp
index 1f36040..f9fc462 100644
--- a/rsAllocation.cpp
+++ b/rsAllocation.cpp
@@ -443,10 +443,8 @@
ALOGE("not implemented");
}
-int32_t Allocation::getSurfaceTextureID(const Context *rsc) {
- int32_t id = rsc->mHal.funcs.allocation.initSurfaceTexture(rsc, this);
- mHal.state.surfaceTextureID = id;
- return id;
+void * Allocation::getSurface(const Context *rsc) {
+ return rsc->mHal.funcs.allocation.getSurface(rsc, this);
}
void Allocation::setSurfaceTexture(const Context *rsc, GLConsumer *st) {
@@ -467,7 +465,7 @@
if (nw) {
nw->incStrong(NULL);
}
- rsc->mHal.funcs.allocation.setSurfaceTexture(rsc, this, nw);
+ rsc->mHal.funcs.allocation.setSurface(rsc, this, nw);
mHal.state.wndSurface = nw;
if (old) {
old->decStrong(NULL);
@@ -641,14 +639,10 @@
(RsAllocationCubemapFace)srcFace);
}
-int32_t rsi_AllocationGetSurfaceTextureID(Context *rsc, RsAllocation valloc) {
+void * rsi_AllocationGetSurface(Context *rsc, RsAllocation valloc) {
Allocation *alloc = static_cast<Allocation *>(valloc);
- return alloc->getSurfaceTextureID(rsc);
-}
-
-void rsi_AllocationGetSurfaceTextureID2(Context *rsc, RsAllocation valloc, void *vst, size_t len) {
- Allocation *alloc = static_cast<Allocation *>(valloc);
- alloc->setSurfaceTexture(rsc, static_cast<GLConsumer *>(vst));
+ void *s = alloc->getSurface(rsc);
+ return s;
}
void rsi_AllocationSetSurface(Context *rsc, RsAllocation valloc, RsNativeWindow sur) {