Prevent transparent region from getting out of sync with Surface Flinger

The ViewRoot is responsible for calculating the current view's surface's
transparent region and reporting this to the window server, which in
turn notifies Surface Flinger.

To minimize cross-process traffic, ViewRoot keeps track of the
most recent transparent region that it has reported to the window
server, and only sends updates when the region shape changes.

ViewRoot is effectively shadowing the internal state of the window
server, and usually this works fine, because ViewRoot is usually the
only thing that changes this value.

But when the surface is recreated, the window server resets the
transparent region to empty. So in order to properly update the window
server we need to reset our copy of its state to empty too.

Fixes issue #2133090: GL Gears runs at half speed in some cases
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index a6d644b..3b83044 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -898,6 +898,7 @@
                         // all at once.
                         newSurface = true;
                         fullRedrawNeeded = true;
+                        mPreviousTransparentRegion.setEmpty();
 
                         if (mGlWanted && !mUseGL) {
                             initializeGL();