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/include/gui/ISurfaceComposerClient.h b/include/gui/ISurfaceComposerClient.h
index 4afc860..cb9816f 100644
--- a/include/gui/ISurfaceComposerClient.h
+++ b/include/gui/ISurfaceComposerClient.h
@@ -27,11 +27,11 @@
#include <ui/PixelFormat.h>
-#include <gui/ISurface.h>
-
namespace android {
// ----------------------------------------------------------------------------
+class IGraphicBufferProducer;
+
class ISurfaceComposerClient : public IInterface
{
public:
@@ -55,9 +55,11 @@
/*
* Requires ACCESS_SURFACE_FLINGER permission
*/
- virtual sp<ISurface> createSurface(
+ virtual status_t createSurface(
const String8& name, uint32_t w, uint32_t h,
- PixelFormat format, uint32_t flags) = 0;
+ PixelFormat format, uint32_t flags,
+ sp<IBinder>* handle,
+ sp<IGraphicBufferProducer>* gbp) = 0;
/*
* Requires ACCESS_SURFACE_FLINGER permission