summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISurfaceComposerClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/ISurfaceComposerClient.cpp')
-rw-r--r--libs/gui/ISurfaceComposerClient.cpp38
1 files changed, 16 insertions, 22 deletions
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp
index 2ecb908..de4d8c1 100644
--- a/libs/gui/ISurfaceComposerClient.cpp
+++ b/libs/gui/ISurfaceComposerClient.cpp
@@ -51,19 +51,17 @@ public:
: BpInterface<ISurfaceComposerClient>(impl) {
}
- virtual ~BpSurfaceComposerClient();
-
- virtual status_t createSurface(const String8& name, uint32_t width,
- uint32_t height, PixelFormat format, uint32_t flags,
+ virtual status_t createSurface(const String8& name, uint32_t w,
+ uint32_t h, PixelFormat format, uint32_t flags,
sp<IBinder>* handle,
sp<IGraphicBufferProducer>* gbp) {
Parcel data, reply;
data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
data.writeString8(name);
- data.writeUint32(width);
- data.writeUint32(height);
- data.writeInt32(static_cast<int32_t>(format));
- data.writeUint32(flags);
+ data.writeInt32(w);
+ data.writeInt32(h);
+ data.writeInt32(format);
+ data.writeInt32(flags);
remote()->transact(CREATE_SURFACE, data, &reply);
*handle = reply.readStrongBinder();
*gbp = interface_cast<IGraphicBufferProducer>(reply.readStrongBinder());
@@ -96,10 +94,6 @@ public:
}
};
-// Out-of-line virtual method definition to trigger vtable emission in this
-// translation unit (see clang warning -Wweak-vtables)
-BpSurfaceComposerClient::~BpSurfaceComposerClient() {}
-
IMPLEMENT_META_INTERFACE(SurfaceComposerClient, "android.ui.ISurfaceComposerClient");
// ----------------------------------------------------------------------
@@ -111,31 +105,31 @@ status_t BnSurfaceComposerClient::onTransact(
case CREATE_SURFACE: {
CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
String8 name = data.readString8();
- uint32_t width = data.readUint32();
- uint32_t height = data.readUint32();
- PixelFormat format = static_cast<PixelFormat>(data.readInt32());
- uint32_t createFlags = data.readUint32();
+ uint32_t w = data.readInt32();
+ uint32_t h = data.readInt32();
+ PixelFormat format = data.readInt32();
+ uint32_t flags = data.readInt32();
sp<IBinder> handle;
sp<IGraphicBufferProducer> gbp;
- status_t result = createSurface(name, width, height, format,
- createFlags, &handle, &gbp);
+ status_t result = createSurface(name, w, h, format, flags,
+ &handle, &gbp);
reply->writeStrongBinder(handle);
reply->writeStrongBinder(IInterface::asBinder(gbp));
reply->writeInt32(result);
return NO_ERROR;
- }
+ } break;
case DESTROY_SURFACE: {
CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
reply->writeInt32(destroySurface( data.readStrongBinder() ) );
return NO_ERROR;
- }
+ } break;
case CLEAR_LAYER_FRAME_STATS: {
CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
sp<IBinder> handle = data.readStrongBinder();
status_t result = clearLayerFrameStats(handle);
reply->writeInt32(result);
return NO_ERROR;
- }
+ } break;
case GET_LAYER_FRAME_STATS: {
CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
sp<IBinder> handle = data.readStrongBinder();
@@ -144,7 +138,7 @@ status_t BnSurfaceComposerClient::onTransact(
reply->write(stats);
reply->writeInt32(result);
return NO_ERROR;
- }
+ } break;
default:
return BBinder::onTransact(code, data, reply, flags);
}