summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-18 11:02:36 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-18 11:02:36 +0800
commit02d9e0cb9e8f143628a384dc20a659861926ca8e (patch)
tree747827f88b1aac44bc540c812f56600773523ba4
parentfd95e0d5b446018eeba9e4884c43513813c70aae (diff)
Detail a possible simplification for lock_resource/unlock_resource.
-rw-r--r--DESIGN10
1 files changed, 10 insertions, 0 deletions
diff --git a/DESIGN b/DESIGN
index 2a922e7..62b32d5 100644
--- a/DESIGN
+++ b/DESIGN
@@ -32,6 +32,16 @@ Issues
lock/unlock a bad name. But it does has the benefit to track the access
to the resources.
+ The prototypes of lock_resource/unlock_resource is designed for flexibility.
+ It allows future extension without breaking the ABI. If that is not a
+ concern (see issue 5),
+
+ void *(*lock_resource)(res_type, void *res);
+ void (*unlock_resource)(res_type, void *res);
+
+ suffice. And struct st_*_resouce can be removed. It is a possible
+ simplification.
+
Another approach is to provide a single lookup_resource call, and make
functions like eglCreatePbufferFromClientBuffer, which requires a real
locking mechanism, special cases.