summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISurfaceTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
-rw-r--r--libs/gui/ISurfaceTexture.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceTexture.cpp b/libs/gui/ISurfaceTexture.cpp
index 41434a4..b4b7492 100644
--- a/libs/gui/ISurfaceTexture.cpp
+++ b/libs/gui/ISurfaceTexture.cpp
@@ -43,6 +43,7 @@ enum {
SET_SYNCHRONOUS_MODE,
CONNECT,
DISCONNECT,
+ SET_SCALING_MODE,
};
@@ -130,6 +131,15 @@ public:
return result;
}
+ virtual status_t setScalingMode(int mode) {
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
+ data.writeInt32(mode);
+ remote()->transact(SET_SCALING_MODE, data, &reply);
+ status_t result = reply.readInt32();
+ return result;
+ }
+
virtual sp<IBinder> getAllocator() {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor());
@@ -244,6 +254,13 @@ status_t BnSurfaceTexture::onTransact(
reply->writeInt32(result);
return NO_ERROR;
} break;
+ case SET_SCALING_MODE: {
+ CHECK_INTERFACE(ISurfaceTexture, data, reply);
+ int mode = data.readInt32();
+ status_t result = setScalingMode(mode);
+ reply->writeInt32(result);
+ return NO_ERROR;
+ } break;
case GET_ALLOCATOR: {
CHECK_INTERFACE(ISurfaceTexture, data, reply);
sp<IBinder> result = getAllocator();