swrast: take ownership rather than adding reference for new renderbuffers
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 8 Apr 2017 00:35:57 +0000 (10:35 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 10 Apr 2017 00:55:34 +0000 (10:55 +1000)
commite6d6266e6f8c01f600be06b8e89f83fa7e1a1caa
tree23244eac69d4251f27cd14c37bddca5be1fdff58
parent6c02387b2c882b69de542de81f3ed121665ae198
swrast: take ownership rather than adding reference for new renderbuffers

This avoids locking in the reference calls and fixes a leak after the
RefCount initialisation was change from 0 to 1.

Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation)
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/swrast/s_renderbuffer.c