summaryrefslogtreecommitdiffstats
path: root/include/gui/ISurfaceTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/ISurfaceTexture.h')
-rw-r--r--include/gui/ISurfaceTexture.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/gui/ISurfaceTexture.h b/include/gui/ISurfaceTexture.h
index e705c6f..5b5b731 100644
--- a/include/gui/ISurfaceTexture.h
+++ b/include/gui/ISurfaceTexture.h
@@ -104,6 +104,24 @@ protected:
// queued buffers will be retired in order.
// The default mode is asynchronous.
virtual status_t setSynchronousMode(bool enabled) = 0;
+
+ // connect attempts to connect a client API to the SurfaceTexture. This
+ // must be called before any other ISurfaceTexture methods are called except
+ // for getAllocator.
+ //
+ // This method will fail if the connect was previously called on the
+ // SurfaceTexture and no corresponding disconnect call was made.
+ virtual status_t connect(int api) = 0;
+
+ // disconnect attempts to disconnect a client API from the SurfaceTexture.
+ // Calling this method will cause any subsequent calls to other
+ // ISurfaceTexture methods to fail except for getAllocator and connect.
+ // Successfully calling connect after this will allow the other methods to
+ // succeed again.
+ //
+ // This method will fail if the the SurfaceTexture is not currently
+ // connected to the specified client API.
+ virtual status_t disconnect(int api) = 0;
};
// ----------------------------------------------------------------------------