[Rounded Corner] Use glScissor on rounded corner layers.

When a layer has rounded corner, blending needs to be turned on such that alpha
value is set correctly. However, this has an impact on performance. In this
patch, we use glScissor to split the layer into three parts, and composite the
top rectangle and bottom rectangle separately with blending on and turn off
blending when we composite the middle part of the layer.

BUG: 128624971
Test: Build, flash and boot. Verify with systrace
Change-Id: Ie6f12f36b8bac8be7566d13a232eaee22fa602ab
4 files changed