In SurfaceFlinger, test fence before merging
am: 377c203375

Change-Id: Icfbcbe58de9f6930f06774f47e6576ec523115bd