OSDN Git Service

Set the right reportNextDraw
authorJohn Reck <jreck@google.com>
Wed, 10 Jun 2015 17:22:43 +0000 (10:22 -0700)
committerJohn Reck <jreck@google.com>
Wed, 10 Jun 2015 17:25:20 +0000 (10:25 -0700)
Bug: 8012229

mReportNextDraw is set by resized to have updateWindow() do
its thing. However if we are in updateWindow() and the
relayout() call to WindowManager wants us to report the draw
we should set reportNextDraw instead of mReportNextDraw
so that we report that frame instead of at the accidental next
invalidate.

Change-Id: If6c38d95599469831a0bd5e4d2b3f6c4f259e40c

core/java/android/view/SurfaceView.java

index 160c662..7d48a9a 100644 (file)
@@ -523,7 +523,7 @@ public class SurfaceView extends View {
                             mVisibleInsets, mStableInsets, mOutsets, mConfiguration,
                             mNewSurface);
                     if ((relayoutResult & WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME) != 0) {
-                        mReportDrawNeeded = true;
+                        reportDrawNeeded = true;
                     }
 
                     if (DEBUG) Log.i(TAG, "New surface: " + mNewSurface