get rid of ISurface
ISurface was only used to get the IGraphicBufferProducer from
a Layer. It's now replaced by a BBinder subclass / IBinder and
is only used as a handle to the surface, to both refer to it
and manage its life-time.
Also cleaned-up a bit the ISurfaceComposer interface and
"create layer" code path.
Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 241a7d6..f124347 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -257,14 +257,18 @@
/* ------------------------------------------------------------------------
* Layer management
*/
- sp<ISurface> createLayer(const String8& name, const sp<Client>& client,
- uint32_t w, uint32_t h, PixelFormat format, uint32_t flags);
+ status_t createLayer(const String8& name, const sp<Client>& client,
+ uint32_t w, uint32_t h, PixelFormat format, uint32_t flags,
+ sp<IBinder>* handle, sp<IGraphicBufferProducer>* gbp);
- sp<Layer> createNormalLayer(const sp<Client>& client,
- uint32_t w, uint32_t h, uint32_t flags, PixelFormat& format);
+ status_t createNormalLayer(const sp<Client>& client, const String8& name,
+ uint32_t w, uint32_t h, uint32_t flags, PixelFormat& format,
+ sp<IBinder>* outHandle, sp<IGraphicBufferProducer>* outGbp,
+ sp<Layer>* outLayer);
- sp<LayerDim> createDimLayer(const sp<Client>& client,
- uint32_t w, uint32_t h, uint32_t flags);
+ status_t createDimLayer(const sp<Client>& client, const String8& name,
+ uint32_t w, uint32_t h, uint32_t flags, sp<IBinder>* outHandle,
+ sp<IGraphicBufferProducer>* outGbp, sp<Layer>* outLayer);
// called in response to the window-manager calling
// ISurfaceComposerClient::destroySurface()