Added opaque flag check for ColorLayer

Currently ColorLayers ignore the opaque flag which is incorrect
behavior. ColorLayer now overrides the isOpaque check to see if the
opauqe flag is set.

If the opaque flag is not set, but has alpha 1, the content on
screen will look the same. However, SF will try to draw any layer
behind the ColorLayer since it doesn't know that the ColorLayer
will obscure it. This is inefficient and could cause rendering to go
into GL composition since it will be creating more rendering layers
than what's needed.

Test: ColorLayers can be opaque
Change-Id: Iab41ae23f17905d61f0ab40a060d53831cf34735
2 files changed