diff --git a/include/surfaceflinger/ISurfaceComposerClient.h b/include/surfaceflinger/ISurfaceComposerClient.h index a1e9e0488..46b1bb7e9 100644 --- a/include/surfaceflinger/ISurfaceComposerClient.h +++ b/include/surfaceflinger/ISurfaceComposerClient.h @@ -64,7 +64,6 @@ public: * Requires ACCESS_SURFACE_FLINGER permission */ virtual sp createSurface( surface_data_t* data, - int pid, const String8& name, DisplayID display, uint32_t w, diff --git a/include/surfaceflinger/SurfaceComposerClient.h b/include/surfaceflinger/SurfaceComposerClient.h index 25b2ebf5a..c61a5bff2 100644 --- a/include/surfaceflinger/SurfaceComposerClient.h +++ b/include/surfaceflinger/SurfaceComposerClient.h @@ -79,7 +79,6 @@ public: //! Create a surface sp createSurface( - int pid, // pid of the process the surface is for const String8& name,// name of the surface DisplayID display, // Display to create this surface on uint32_t w, // width in pixel @@ -89,7 +88,6 @@ public: ); sp createSurface( - int pid, // pid of the process the surface is for DisplayID display, // Display to create this surface on uint32_t w, // width in pixel uint32_t h, // height in pixel diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index 7730eb1fa..ea38e08a5 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -83,7 +83,6 @@ public: } virtual sp createSurface( surface_data_t* params, - int pid, const String8& name, DisplayID display, uint32_t w, @@ -93,7 +92,6 @@ public: { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor()); - data.writeInt32(pid); data.writeString8(name); data.writeInt32(display); data.writeInt32(w); @@ -172,14 +170,13 @@ status_t BnSurfaceComposerClient::onTransact( case CREATE_SURFACE: { CHECK_INTERFACE(ISurfaceComposerClient, data, reply); surface_data_t params; - int32_t pid = data.readInt32(); String8 name = data.readString8(); DisplayID display = data.readInt32(); uint32_t w = data.readInt32(); uint32_t h = data.readInt32(); PixelFormat format = data.readInt32(); uint32_t flags = data.readInt32(); - sp s = createSurface(¶ms, pid, name, display, w, h, + sp s = createSurface(¶ms, name, display, w, h, format, flags); params.writeToParcel(reply); reply->writeStrongBinder(s->asBinder()); diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index d3367246a..a1ff2c1e2 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -273,7 +273,6 @@ ssize_t SurfaceComposerClient::getNumberOfDisplays() } sp SurfaceComposerClient::createSurface( - int pid, DisplayID display, uint32_t w, uint32_t h, @@ -286,12 +285,11 @@ sp SurfaceComposerClient::createSurface( snprintf(buffer, SIZE, "", getpid()); name.append(buffer); - return SurfaceComposerClient::createSurface(pid, name, display, + return SurfaceComposerClient::createSurface(name, display, w, h, format, flags); } sp SurfaceComposerClient::createSurface( - int pid, const String8& name, DisplayID display, uint32_t w, @@ -302,7 +300,7 @@ sp SurfaceComposerClient::createSurface( sp result; if (mStatus == NO_ERROR) { ISurfaceComposerClient::surface_data_t data; - sp surface = mClient->createSurface(&data, pid, name, + sp surface = mClient->createSurface(&data, name, display, w, h, format, flags); if (surface != 0) { result = new SurfaceControl(this, surface, data, w, h, format, flags); diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 2f3a144ec..7506f298f 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1241,8 +1241,10 @@ int SurfaceFlinger::setOrientation(DisplayID dpy, return orientation; } -sp SurfaceFlinger::createSurface(const sp& client, int pid, - const String8& name, ISurfaceComposerClient::surface_data_t* params, +sp SurfaceFlinger::createSurface( + ISurfaceComposerClient::surface_data_t* params, + const String8& name, + const sp& client, DisplayID d, uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { @@ -2414,12 +2416,12 @@ ssize_t Client::getTokenForSurface(const sp& sur) const { return -1; } sp Client::createSurface( - ISurfaceComposerClient::surface_data_t* params, int pid, + ISurfaceComposerClient::surface_data_t* params, const String8& name, DisplayID display, uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { - return mFlinger->createSurface(this, pid, name, params, + return mFlinger->createSurface(params, name, this, display, w, h, format, flags); } status_t Client::destroySurface(SurfaceID sid) { @@ -2523,7 +2525,7 @@ ssize_t UserClient::getTokenForSurface(const sp& sur) const } sp UserClient::createSurface( - ISurfaceComposerClient::surface_data_t* params, int pid, + ISurfaceComposerClient::surface_data_t* params, const String8& name, DisplayID display, uint32_t w, uint32_t h, PixelFormat format, uint32_t flags) { diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index 8d431574a..1b36d1cd6 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -75,7 +75,7 @@ private: virtual sp getControlBlock() const; virtual ssize_t getTokenForSurface(const sp& sur) const; virtual sp createSurface( - surface_data_t* params, int pid, const String8& name, + surface_data_t* params, const String8& name, DisplayID display, uint32_t w, uint32_t h,PixelFormat format, uint32_t flags); virtual status_t destroySurface(SurfaceID surfaceId); @@ -107,7 +107,7 @@ private: virtual sp getControlBlock() const; virtual ssize_t getTokenForSurface(const sp& sur) const; virtual sp createSurface( - surface_data_t* params, int pid, const String8& name, + surface_data_t* params, const String8& name, DisplayID display, uint32_t w, uint32_t h,PixelFormat format, uint32_t flags); virtual status_t destroySurface(SurfaceID surfaceId); @@ -232,9 +232,10 @@ private: friend class Layer; friend class LayerDim; - sp createSurface(const sp& client, - int pid, const String8& name, + sp createSurface( ISurfaceComposerClient::surface_data_t* params, + const String8& name, + const sp& client, DisplayID display, uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);