summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-25 14:38:25 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-25 14:39:19 +0800
commit72a77bf6e90222badfa274f1f7054d2c8c110c08 (patch)
tree7428237b2a808b55d1e87e46ef2d16b391ddd19c
parent5e552fd45b832485117e03ce18e84ab16f622b11 (diff)
An st_manager corresponds to a display in the window system.
There may be two displays both using the same state tracker. Pass st_manager when contexts are created, instead of when the st_api is created.
-rw-r--r--st_api.h42
1 files changed, 22 insertions, 20 deletions
diff --git a/st_api.h b/st_api.h
index 4f0e9bc..2b1e9aa 100644
--- a/st_api.h
+++ b/st_api.h
@@ -262,6 +262,26 @@ struct st_context
typedef void (*st_proc_t)(void);
/**
+ * Represent a state tracker manager.
+ *
+ * This interface is implemented by the state tracker manager. It corresponds
+ * to a "display" in the window system.
+ */
+struct st_manager
+{
+ /**
+ * Lock and unlock a state tracker manager resource.
+ *
+ * This gives access to the underlying data structure of a state tracker
+ * manager resource.
+ */
+ void *(*lock_resource)(struct st_manager *smapi,
+ enum st_manager_resource_type type, void *res);
+ void (*unlock_resource)(struct st_manager *smapi,
+ enum st_manager_resource_type type, void *res);
+};
+
+/**
* Represent a rendering API such as OpenGL or OpenVG.
*
* Implemented by the state tracker and used by the state tracker manager.
@@ -282,6 +302,7 @@ struct st_api
* XXX: Is visual needed?
*/
struct st_context *(*create_context)(struct st_api *stapi,
+ struct st_manager *smapi,
struct pipe_context *pipe,
const struct st_visual *visual,
struct st_context *stshare);
@@ -310,25 +331,6 @@ struct st_api
};
/**
- * Represent a state tracker manager.
- *
- * This interface is implemented by the state tracker manager.
- */
-struct st_manager
-{
- /**
- * Lock and unlock a state tracker manager resource.
- *
- * This gives access to the underlying data structure of a state tracker
- * manager resource.
- */
- void *(*lock_resource)(const struct st_manager *smapi,
- enum st_manager_resource_type type, void *res);
- void (*unlock_resource)(const struct st_manager *smapi,
- enum st_manager_resource_type type, void *res);
-};
-
-/**
* Represent a state tracker.
*
* This is the entry point of a state tracker.
@@ -336,7 +338,7 @@ struct st_manager
struct st_module
{
enum st_module_api api;
- struct st_api *(*create_api)(const struct st_manager *smapi);
+ struct st_api *(*create_api)(void);
};
/**