diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-09-13 15:35:03 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-09-13 16:02:10 -0700 |
commit | 76a3cb9773d01079de447c16741f628d19108087 (patch) | |
tree | f8d6d53acee25d387443e32f6699946048aee35c /services | |
parent | cdfc56a3872f6bae7c43aedd5c718c5fa3fbdf9d (diff) | |
download | frameworks_base-76a3cb9773d01079de447c16741f628d19108087.zip frameworks_base-76a3cb9773d01079de447c16741f628d19108087.tar.gz frameworks_base-76a3cb9773d01079de447c16741f628d19108087.tar.bz2 |
We don't need black frames for forced display size.
Now that surface flinger lets us set a display projection,
the window manager no longer needs to place a black frame
around the content when simulating a different display size.
Bug: 7139798
Change-Id: I6014390f47444633d434ccf918cee5ff7b502869
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowAnimator.java | 9 | ||||
-rwxr-xr-x | services/java/com/android/server/wm/WindowManagerService.java | 53 |
2 files changed, 0 insertions, 62 deletions
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java index 72c6a51..cabe611 100644 --- a/services/java/com/android/server/wm/WindowAnimator.java +++ b/services/java/com/android/server/wm/WindowAnimator.java @@ -611,15 +611,6 @@ public class WindowAnimator { !mService.okToDisplay()); } - if (mService.mBlackFrame != null) { - if (mScreenRotationAnimation != null) { - mService.mBlackFrame.setMatrix( - mScreenRotationAnimation.getEnterTransformation().getMatrix()); - } else { - mService.mBlackFrame.clearMatrix(); - } - } - if (mService.mWatermark != null) { mService.mWatermark.drawIfNeeded(); } diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index dd98007..de0b2d3 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -430,8 +430,6 @@ public class WindowManagerService extends IWindowManager.Stub Watermark mWatermark; StrictModeFlash mStrictModeFlash; - BlackFrame mBlackFrame; - final float[] mTmpFloats = new float[9]; boolean mDisplayReady; @@ -6036,8 +6034,6 @@ public class WindowManagerService extends IWindowManager.Stub } } - rebuildBlackFrameLocked(); - final WindowList windows = displayContent.getWindowList(); for (int i = windows.size() - 1; i >= 0; i--) { WindowState w = windows.get(i); @@ -7854,49 +7850,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - private void rebuildBlackFrameLocked() { - if (mBlackFrame != null) { - mBlackFrame.kill(); - mBlackFrame = null; - } - // TODO(multidisplay): For now rotations are only main screen. - final DisplayContent displayContent = getDefaultDisplayContentLocked(); - final Display display = displayContent.getDisplay(); - if (displayContent.mBaseDisplayWidth < displayContent.mInitialDisplayWidth - || displayContent.mBaseDisplayHeight < displayContent.mInitialDisplayHeight) { - int initW, initH, baseW, baseH; - final boolean rotated = (mRotation == Surface.ROTATION_90 - || mRotation == Surface.ROTATION_270); - if (DEBUG_BOOT) { - Slog.i(TAG, "BLACK FRAME: rotated=" + rotated + " init=" - + displayContent.mInitialDisplayWidth + "x" - + displayContent.mInitialDisplayHeight + " base=" - + displayContent.mBaseDisplayWidth + "x" - + displayContent.mBaseDisplayHeight); - } - if (rotated) { - initW = displayContent.mInitialDisplayHeight; - initH = displayContent.mInitialDisplayWidth; - baseW = displayContent.mBaseDisplayHeight; - baseH = displayContent.mBaseDisplayWidth; - } else { - initW = displayContent.mInitialDisplayWidth; - initH = displayContent.mInitialDisplayHeight; - baseW = displayContent.mBaseDisplayWidth; - baseH = displayContent.mBaseDisplayHeight; - } - Rect outer = new Rect(0, 0, initW, initH); - Rect inner = new Rect(0, 0, baseW, baseH); - try { - mBlackFrame = new BlackFrame(mFxSession, outer, inner, MASK_LAYER, - display.getLayerStack()); - } catch (Surface.OutOfResourcesException e) { - } - } - } - private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayContent) { - boolean changed = false; final String sizeStr = Settings.Global.getString(mContext.getContentResolver(), Settings.Global.DISPLAY_SIZE_FORCED); if (sizeStr != null && sizeStr.length() > 0) { @@ -7909,7 +7863,6 @@ public class WindowManagerService extends IWindowManager.Stub synchronized(displayContent.mDisplaySizeLock) { if (displayContent.mBaseDisplayWidth != width || displayContent.mBaseDisplayHeight != height) { - changed = true; Slog.i(TAG, "FORCED DISPLAY SIZE: " + width + "x" + height); displayContent.mBaseDisplayWidth = width; displayContent.mBaseDisplayHeight = height; @@ -7927,7 +7880,6 @@ public class WindowManagerService extends IWindowManager.Stub density = Integer.parseInt(densityStr); synchronized(displayContent.mDisplaySizeLock) { if (displayContent.mBaseDisplayDensity != density) { - changed = true; Slog.i(TAG, "FORCED DISPLAY DENSITY: " + density); displayContent.mBaseDisplayDensity = density; } @@ -7935,9 +7887,6 @@ public class WindowManagerService extends IWindowManager.Stub } catch (NumberFormatException ex) { } } - if (changed) { - rebuildBlackFrameLocked(); - } } private void setForcedDisplaySizeLocked(DisplayContent displayContent, int width, int height) { @@ -8011,8 +7960,6 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION); } - rebuildBlackFrameLocked(); - performLayoutAndPlaceSurfacesLocked(); } |