randr: unref the provider shared pixmap the appropriate number of times
authorAaron Plattner <aplattner@nvidia.com>
Thu, 24 Jan 2013 00:58:47 +0000 (16:58 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 12 Feb 2013 06:28:24 +0000 (22:28 -0800)
commit7115f6c709898a5124b67e19c61dc01334471358
tree110496c21d05e96dbc962231e0f0ed5733ebcfda
parentda92690107d90061205340d4cdc98b73b59db9b2
randr: unref the provider shared pixmap the appropriate number of times

When an RandR shared pixmap is created in rrCreateSharedPixmap, it has a refcnt
of 1.  Then, PixmapShareToSlave bumps the refcnt to 2.  However, there's no
corresponding PixmapUnshareFromSlave where the refcnt can be decreased again,
and there's no convenient common place where the refcnt can be decremented when
the slave pixmap is destroyed.

Fix this by just unreffing the pixmap twice in RRCrtcDetachScanoutPixmap.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
randr/rrcrtc.c