Skip to content

Commit 3a1136e

Browse files
Jeff BrownAndroid (Google) Code Review
authored andcommitted
Merge "We don't need black frames for forced display size." into jb-mr1-dev
2 parents 33aef98 + 76a3cb9 commit 3a1136e

File tree

2 files changed

+0
-62
lines changed

2 files changed

+0
-62
lines changed

services/java/com/android/server/wm/WindowAnimator.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -611,15 +611,6 @@ private void animateLocked() {
611611
!mService.okToDisplay());
612612
}
613613

614-
if (mService.mBlackFrame != null) {
615-
if (mScreenRotationAnimation != null) {
616-
mService.mBlackFrame.setMatrix(
617-
mScreenRotationAnimation.getEnterTransformation().getMatrix());
618-
} else {
619-
mService.mBlackFrame.clearMatrix();
620-
}
621-
}
622-
623614
if (mService.mWatermark != null) {
624615
mService.mWatermark.drawIfNeeded();
625616
}

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,6 @@ public void onReceive(Context context, Intent intent) {
430430
Watermark mWatermark;
431431
StrictModeFlash mStrictModeFlash;
432432

433-
BlackFrame mBlackFrame;
434-
435433
final float[] mTmpFloats = new float[9];
436434

437435
boolean mDisplayReady;
@@ -6039,8 +6037,6 @@ public boolean updateRotationUncheckedLocked(boolean inTransaction) {
60396037
}
60406038
}
60416039

6042-
rebuildBlackFrameLocked();
6043-
60446040
final WindowList windows = displayContent.getWindowList();
60456041
for (int i = windows.size() - 1; i >= 0; i--) {
60466042
WindowState w = windows.get(i);
@@ -7857,49 +7853,7 @@ public void setForcedDisplaySize(int displayId, int width, int height) {
78577853
}
78587854
}
78597855

7860-
private void rebuildBlackFrameLocked() {
7861-
if (mBlackFrame != null) {
7862-
mBlackFrame.kill();
7863-
mBlackFrame = null;
7864-
}
7865-
// TODO(multidisplay): For now rotations are only main screen.
7866-
final DisplayContent displayContent = getDefaultDisplayContentLocked();
7867-
final Display display = displayContent.getDisplay();
7868-
if (displayContent.mBaseDisplayWidth < displayContent.mInitialDisplayWidth
7869-
|| displayContent.mBaseDisplayHeight < displayContent.mInitialDisplayHeight) {
7870-
int initW, initH, baseW, baseH;
7871-
final boolean rotated = (mRotation == Surface.ROTATION_90
7872-
|| mRotation == Surface.ROTATION_270);
7873-
if (DEBUG_BOOT) {
7874-
Slog.i(TAG, "BLACK FRAME: rotated=" + rotated + " init="
7875-
+ displayContent.mInitialDisplayWidth + "x"
7876-
+ displayContent.mInitialDisplayHeight + " base="
7877-
+ displayContent.mBaseDisplayWidth + "x"
7878-
+ displayContent.mBaseDisplayHeight);
7879-
}
7880-
if (rotated) {
7881-
initW = displayContent.mInitialDisplayHeight;
7882-
initH = displayContent.mInitialDisplayWidth;
7883-
baseW = displayContent.mBaseDisplayHeight;
7884-
baseH = displayContent.mBaseDisplayWidth;
7885-
} else {
7886-
initW = displayContent.mInitialDisplayWidth;
7887-
initH = displayContent.mInitialDisplayHeight;
7888-
baseW = displayContent.mBaseDisplayWidth;
7889-
baseH = displayContent.mBaseDisplayHeight;
7890-
}
7891-
Rect outer = new Rect(0, 0, initW, initH);
7892-
Rect inner = new Rect(0, 0, baseW, baseH);
7893-
try {
7894-
mBlackFrame = new BlackFrame(mFxSession, outer, inner, MASK_LAYER,
7895-
display.getLayerStack());
7896-
} catch (Surface.OutOfResourcesException e) {
7897-
}
7898-
}
7899-
}
7900-
79017856
private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayContent) {
7902-
boolean changed = false;
79037857
final String sizeStr = Settings.Global.getString(mContext.getContentResolver(),
79047858
Settings.Global.DISPLAY_SIZE_FORCED);
79057859
if (sizeStr != null && sizeStr.length() > 0) {
@@ -7912,7 +7866,6 @@ private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayC
79127866
synchronized(displayContent.mDisplaySizeLock) {
79137867
if (displayContent.mBaseDisplayWidth != width
79147868
|| displayContent.mBaseDisplayHeight != height) {
7915-
changed = true;
79167869
Slog.i(TAG, "FORCED DISPLAY SIZE: " + width + "x" + height);
79177870
displayContent.mBaseDisplayWidth = width;
79187871
displayContent.mBaseDisplayHeight = height;
@@ -7930,17 +7883,13 @@ private void readForcedDisplaySizeAndDensityLocked(final DisplayContent displayC
79307883
density = Integer.parseInt(densityStr);
79317884
synchronized(displayContent.mDisplaySizeLock) {
79327885
if (displayContent.mBaseDisplayDensity != density) {
7933-
changed = true;
79347886
Slog.i(TAG, "FORCED DISPLAY DENSITY: " + density);
79357887
displayContent.mBaseDisplayDensity = density;
79367888
}
79377889
}
79387890
} catch (NumberFormatException ex) {
79397891
}
79407892
}
7941-
if (changed) {
7942-
rebuildBlackFrameLocked();
7943-
}
79447893
}
79457894

79467895
private void setForcedDisplaySizeLocked(DisplayContent displayContent, int width, int height) {
@@ -8014,8 +7963,6 @@ private void reconfigureDisplayLocked(DisplayContent displayContent) {
80147963
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
80157964
}
80167965

8017-
rebuildBlackFrameLocked();
8018-
80197966
performLayoutAndPlaceSurfacesLocked();
80207967
}
80217968

0 commit comments

Comments
 (0)