Merge "Apply letterbox changes when background color changes." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-02-05 14:20:12 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions

View File

@@ -340,7 +340,7 @@ public class Letterbox {
}
public void applySurfaceChanges(SurfaceControl.Transaction t) {
if (mSurfaceFrameRelative.equals(mLayoutFrameRelative)) {
if (!needsApplySurfaceChanges()) {
// Nothing changed.
return;
}

View File

@@ -183,6 +183,10 @@ public class LetterboxTest {
mColor = Color.GREEN;
assertTrue(mLetterbox.needsApplySurfaceChanges());
mLetterbox.applySurfaceChanges(mTransaction);
verify(mTransaction).setColor(mSurfaces.top, new float[]{0, 1, 0});
}
@Test