mesa: Remove deleteFlag pattern from container objects.

This pattern was only useful when we used mutex locks, which the previous
commit removed.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
Matt Turner 2017-04-05 14:29:00 +10:00 committed by Timothy Arceri
parent 0b2750620b
commit ef6af0d5f7
2 changed files with 2 additions and 6 deletions

View File

@ -188,14 +188,12 @@ _mesa_reference_vao_(struct gl_context *ctx,
if (*ptr) {
/* Unreference the old array object */
GLboolean deleteFlag = GL_FALSE;
struct gl_vertex_array_object *oldObj = *ptr;
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
if (deleteFlag)
if (oldObj->RefCount == 0)
_mesa_delete_vao(ctx, oldObj);
*ptr = NULL;

View File

@ -184,14 +184,12 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
if (*ptr) {
/* Unreference the old pipeline object */
GLboolean deleteFlag = GL_FALSE;
struct gl_pipeline_object *oldObj = *ptr;
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
if (deleteFlag) {
if (oldObj->RefCount == 0) {
_mesa_delete_pipeline_object(ctx, oldObj);
}