Improve error detection in HardwareRenderer.draw(). Bug #3280872
Improve error detection in HardwareRenderer.draw().
Bug #3280872

This should avoid crashes before we detect a GL error and we switch over to
software rendering.

Change-Id: Ieb4992576d20014e194aab863a456f09c5e19672

xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base,xorware/android_frameworks_base