summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-03-11 15:06:54 -0800
committerMathias Agopian <mathias@google.com>2010-03-11 15:06:54 -0800
commit2f7540e78f2a0952ddbbd9b953e186b90f401734 (patch)
treea507541a85465b755372d2e8e638dc0fe3a5bb92 /include
parentf6331a497455fdb6618bf4c634c9326695304c24 (diff)
downloadframeworks_base-2f7540e78f2a0952ddbbd9b953e186b90f401734.zip
frameworks_base-2f7540e78f2a0952ddbbd9b953e186b90f401734.tar.gz
frameworks_base-2f7540e78f2a0952ddbbd9b953e186b90f401734.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/surfaceflinger/Surface.h8
1 files changed, 8 insertions, 0 deletions
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<GraphicBuffer>* 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<SurfaceComposerClient> 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.