handle IllegalStateException from Surface.lockCanvas

Symptom: SystemServer crash because of this exception on startingWindow
Root Cause: IllegalStateException from Surface.lockCanvas
Solution: handle IllegalStateException from Surface.lockCanvas

Change-Id: Ifb1b3b72877dfd9994ebf17dcef4778f88821301
Forced to update whole region in case of computation error

Symptom: unexpected render result (a line is not refresh)
Root Cause: computation error between dirty rigon and drawing area
Solution: Forced to update whole region in case of computation error

Change-Id: I227ceb2cc14294ae2e4276b8c62b05ec758f1d56