Merge "Apply letterbox changes when background color changes." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
335a4536ab
@@ -340,7 +340,7 @@ public class Letterbox {
|
||||
}
|
||||
|
||||
public void applySurfaceChanges(SurfaceControl.Transaction t) {
|
||||
if (mSurfaceFrameRelative.equals(mLayoutFrameRelative)) {
|
||||
if (!needsApplySurfaceChanges()) {
|
||||
// Nothing changed.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user