@@ -116,7 +116,6 @@ class DrawableEngine extends Engine {
116116 private final DisplayInfo mTmpDisplayInfo = new DisplayInfo ();
117117
118118 boolean mVisible = true ;
119- boolean mRedrawNeeded ;
120119 boolean mOffsetsChanged ;
121120 int mLastXTranslation ;
122121 int mLastYTranslation ;
@@ -153,6 +152,9 @@ class DrawableEngine extends Engine {
153152 private int mDisplayWidthAtLastSurfaceSizeUpdate = -1 ;
154153 private int mDisplayHeightAtLastSurfaceSizeUpdate = -1 ;
155154
155+ private int mLastRequestedWidth = -1 ;
156+ private int mLastRequestedHeight = -1 ;
157+
156158 public DrawableEngine () {
157159 super ();
158160 setFixedSizeAllowed (true );
@@ -211,21 +213,13 @@ void updateSurfaceSize(SurfaceHolder surfaceHolder, DisplayInfo displayInfo) {
211213 int surfaceWidth = Math .max (displayInfo .logicalWidth , mBackgroundWidth );
212214 int surfaceHeight = Math .max (displayInfo .logicalHeight , mBackgroundHeight );
213215
214- // If the surface dimensions haven't changed, then just return
215- final Rect frame = surfaceHolder .getSurfaceFrame ();
216- if (frame != null ) {
217- final int dw = frame .width ();
218- final int dh = frame .height ();
219- if (surfaceWidth == dw && surfaceHeight == dh ) {
220- return ;
221- }
222- }
223-
224216 if (FIXED_SIZED_SURFACE ) {
225217 // Used a fixed size surface, because we are special. We can do
226218 // this because we know the current design of window animations doesn't
227219 // cause this to break.
228220 surfaceHolder .setFixedSize (surfaceWidth , surfaceHeight );
221+ mLastRequestedWidth = surfaceWidth ;
222+ mLastRequestedHeight = surfaceHeight ;
229223 } else {
230224 surfaceHolder .setSizeFromLayout ();
231225 }
@@ -387,7 +381,6 @@ void drawFrame() {
387381 yPixels += (int ) (availhUnscaled * (mYOffset - .5f ) + .5f );
388382
389383 mOffsetsChanged = false ;
390- mRedrawNeeded = false ;
391384 if (surfaceDimensionsChanged ) {
392385 mLastSurfaceWidth = dw ;
393386 mLastSurfaceHeight = dh ;
@@ -475,13 +468,15 @@ protected void dump(String prefix, FileDescriptor fd, PrintWriter out, String[]
475468 out .print (" mYOffset=" ); out .println (mYOffset );
476469
477470 out .print (prefix ); out .print (" mVisible=" ); out .print (mVisible );
478- out .print (" mRedrawNeeded=" ); out .print (mRedrawNeeded );
479471 out .print (" mOffsetsChanged=" ); out .println (mOffsetsChanged );
480472
481473 out .print (prefix ); out .print (" mLastXTranslation=" ); out .print (mLastXTranslation );
482474 out .print (" mLastYTranslation=" ); out .print (mLastYTranslation );
483475 out .print (" mScale=" ); out .println (mScale );
484476
477+ out .print (prefix ); out .print (" mLastRequestedWidth=" ); out .print (mLastRequestedWidth );
478+ out .print (" mLastRequestedHeight=" ); out .println (mLastRequestedHeight );
479+
485480 out .print (prefix ); out .println (" DisplayInfo at last updateSurfaceSize:" );
486481 out .print (prefix );
487482 out .print (" rotation=" ); out .print (mRotationAtLastSurfaceSizeUpdate );
0 commit comments