Updated code to use check on availability of gradient opacity

Change-Id: I47246e5d04478eed9c736bac0084bdaf67844312