hwc: Check vsync state before sending it up

The vsync enable ioctl is called in  a separate thread in a
recent change
Hence it was now possible that vsync could be disabled but
SurfaceFlinger still received a vsync. With this check we make
sure that doesn't happen.

Change-Id: I459c0b98ab9ce972d86a361c5ecdfe0c1a2d0e74
1 file changed