summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/iunknown.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-12-03 19:37:06 +0100
committerAxel Davy <[email protected]>2016-12-20 23:47:08 +0100
commit2fc8ef1401d455e3861bb233f09de4158d56a6be (patch)
tree9675afa035dd36c08b4279b60eb8b560c2522fac /src/gallium/state_trackers/nine/iunknown.c
parent098ba64c4c2e15defb469b791fb3e88f89ae8759 (diff)
st/nine: Comment and simplify iunknown
The behaviour is a bit less obscure now. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/iunknown.c')
-rw-r--r--src/gallium/state_trackers/nine/iunknown.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/iunknown.c b/src/gallium/state_trackers/nine/iunknown.c
index 28e475659f4..eae4997aa1c 100644
--- a/src/gallium/state_trackers/nine/iunknown.c
+++ b/src/gallium/state_trackers/nine/iunknown.c
@@ -110,9 +110,6 @@ NineUnknown_AddRef( struct NineUnknown *This )
if (r == 1) {
if (This->device)
NineUnknown_AddRef(NineUnknown(This->device));
- /* This shouldn't be necessary:
- if (This->container)
- NineUnknown_Bind(NineUnknown(This->container)); */
}
return r;
}
@@ -130,10 +127,8 @@ NineUnknown_Release( struct NineUnknown *This )
if (NineUnknown_Release(NineUnknown(This->device)) == 0)
return r; /* everything's gone */
}
- if (This->container) {
- /* NineUnknown_Unbind(NineUnknown(This->container)); */
- } else
- if (This->bind == 0) {
+ /* Containers (here with !forward) take care of item destruction */
+ if (!This->container && This->bind == 0) {
This->dtor(This);
}
}