From 2f7540e78f2a0952ddbbd9b953e186b90f401734 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 11 Mar 2010 15:06:54 -0800 Subject: implement connect/disconnect in our native_window_t implementations the framebuffer implementation doesn't do anything special with this but the surfaceflinger implementation makes sure the surface is not used by two APIs simultaneously. Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b --- include/surfaceflinger/Surface.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/surfaceflinger') diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index 9808832..0279d84 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -210,9 +210,16 @@ private: status_t dequeueBuffer(sp* buffer); + void dispatch_setUsage(va_list args); + int dispatch_connect(va_list args); + int dispatch_disconnect(va_list args); void setUsage(uint32_t reqUsage); + int connect(int api); + int disconnect(int api); + uint32_t getUsage() const; + int getConnectedApi() const; // constants sp mClient; @@ -227,6 +234,7 @@ private: // protected by mSurfaceLock Rect mSwapRectangle; uint32_t mUsage; + int mConnected; // protected by mSurfaceLock. These are also used from lock/unlock // but in that case, they must be called form the same thread. -- cgit v1.1