@@ -125,39 +125,14 @@ TEST_F(MultiDisplayTest, RenderLayerInVirtualDisplay) {
125125}
126126
127127TEST_F (MultiDisplayTest, RenderLayerInMirroredVirtualDisplay) {
128- // Create a display and set its layer stack to the main display's layer stack so
129- // the contents of the main display are mirrored on to the virtual display.
130-
131- // Assumption here is that the new mirrored display has the same layer stack rect as the
132- // primary display that it is mirroring.
133- createDisplay (mMainDisplayState .layerStackSpaceRect , ui::DEFAULT_LAYER_STACK);
134- createColorLayer (ui::DEFAULT_LAYER_STACK);
135-
136- sp<SurfaceControl> mirrorSc =
137- SurfaceComposerClient::getDefault ()->mirrorDisplay (mMainDisplayId );
138-
139- asTransaction ([&](Transaction& t) { t.setPosition (mColorLayer , 10 , 10 ); });
140-
141- // Verify color layer renders correctly on main display and it is mirrored on the
142- // virtual display.
143- std::unique_ptr<ScreenCapture> sc;
144- ScreenCapture::captureScreen (&sc, mMainDisplay );
145- sc->expectColor (Rect (10 , 10 , 40 , 50 ), mExpectedColor );
146- sc->expectColor (Rect (0 , 0 , 9 , 9 ), {0 , 0 , 0 , 255 });
147-
148- ScreenCapture::captureScreen (&sc, mVirtualDisplay );
149- sc->expectColor (Rect (10 , 10 , 40 , 50 ), mExpectedColor );
150- sc->expectColor (Rect (0 , 0 , 9 , 9 ), {0 , 0 , 0 , 255 });
151- }
152-
153- TEST_F (MultiDisplayTest, RenderLayerWithPromisedFenceInMirroredVirtualDisplay) {
154128 // Create a display and use a unique layerstack ID for mirrorDisplay() so
155129 // the contents of the main display are mirrored on to the virtual display.
156130
157131 // A unique layerstack ID must be used because sharing the same layerFE
158132 // with more than one display is unsupported. A unique layerstack ensures
159- // that a different layerFE is used between displays.
160- constexpr ui::LayerStack layerStack{77687666 }; // ASCII for MDLB (MultiDisplayLayerBounds)
133+ // that a different layerFE is used between displays. Each layerFE has a
134+ // promised fence that is each fulfilled.
135+ constexpr ui::LayerStack layerStack{776884 }; // ASCII for MDT (MultiDisplayTest)
161136 createDisplay (mMainDisplayState .layerStackSpaceRect , layerStack);
162137 createColorLayer (ui::DEFAULT_LAYER_STACK);
163138
0 commit comments