fix SIGFPE in hwcomposer caused by modulo by zero

Change-Id: I36e798dc01a54340c8014a23be0081443b62ef70
Merge pull request #2 from CyanogenMod/cm-11.0

fix SIGFPE in hwcomposer caused by modulo by zero