Merge "We don't need black frames for forced display size." into jb-mr1-dev
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -430,8 +430,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
Watermark mWatermark;
|
||||
StrictModeFlash mStrictModeFlash;
|
||||
|
||||
BlackFrame mBlackFrame;
|
||||
|
||||
final float[] mTmpFloats = new float[9];
|
||||
|
||||
boolean mDisplayReady;
|
||||
@@ -6039,8 +6037,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);
|
||||
@@ -7857,49 +7853,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) {
|
||||
@@ -7912,7 +7866,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;
|
||||
@@ -7930,7 +7883,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;
|
||||
}
|
||||
@@ -7938,9 +7890,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
} catch (NumberFormatException ex) {
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
rebuildBlackFrameLocked();
|
||||
}
|
||||
}
|
||||
|
||||
private void setForcedDisplaySizeLocked(DisplayContent displayContent, int width, int height) {
|
||||
@@ -8014,8 +7963,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
|
||||
}
|
||||
|
||||
rebuildBlackFrameLocked();
|
||||
|
||||
performLayoutAndPlaceSurfacesLocked();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user