def impl_test(self):
        ensureHasContentOnSurface(self.renderer, self.rendererSurfaceIviId)
        ensureHasContentOnSurface(self.rendererbackground,
                                  self.backgroundRendererSurfaceIviId)

        self.renderer.showScene(26)
        self.renderer.send_ramsh_command("skipUnmodifiedBuffers 0",
                                         waitForRendererConfirmation=True)

        # Add surface to second layer
        self.renderer.send_ramsh_command("scAddSurfaceToLayer {0} {1}".format(
            self.rendererSurfaceIviId, self.secondLayerIviId),
                                         waitForRendererConfirmation=True)
        ensureSystemCompositorRoundTrip(self.renderer,
                                        self.rendererSurfaceIviId)
        self.validateScreenshot(self.renderer,
                                "testClient_move_between_IVI_layers_A.png",
                                useSystemCompositorForScreenshot=True)

        # Remove surface from first layer
        self.renderer.send_ramsh_command(
            "scRemoveSurfaceFromLayer {0} {1}".format(
                self.rendererSurfaceIviId, self.firstLayerIviId),
            waitForRendererConfirmation=True)
        ensureSystemCompositorRoundTrip(self.renderer,
                                        self.rendererSurfaceIviId)
        self.validateScreenshot(self.renderer,
                                "testClient_move_between_IVI_layers_B.png",
                                useSystemCompositorForScreenshot=True)
    def impl_test(self):
        # Precondition: renderer visible
        self.validateScreenshot(self.renderer,
                                "scc_only_cube.png",
                                useSystemCompositorForScreenshot=True)

        # Surface is controlled by scc before the application creates the surface
        self.renderer.send_ramsh_command("scastl {0} {1}".format(
            self.testSurfaceIVIIds["wlClient3"], self.testLayer),
                                         waitForRendererConfirmation=True)
        self.renderer.send_ramsh_command("scv {0} 1".format(
            self.testSurfaceIVIIds["wlClient3"]),
                                         waitForRendererConfirmation=True)
        self.expectedSurfaceIds.add("{0}".format(
            self.testSurfaceIVIIds["wlClient3"]))
        self.assertTrue(self.wait_on_surfaces_beeing_registered_in_scc())
        self.wlClient3 = self.target.start_application(
            "ivi-gears",
            "-I {0} --still -g 480x480".format(
                self.testSurfaceIVIIds["wlClient3"]),
            binaryDirectoryOnTarget=self.target.baseWorkingDirectory)
        self.addCleanup(self.target.kill_application, self.wlClient3)

        # wait for content available on wlClient3 surface before doing screenshot
        ensureHasContentOnSurface(self.renderer,
                                  self.testSurfaceIVIIds["wlClient3"])

        ensureSystemCompositorRoundTrip(self.renderer,
                                        self.testSurfaceIVIIds["wlClient3"])
        # Postcondition: renderer and gears No. 3 visible
        self.validateScreenshot(self.renderer,
                                "scc_big_red_gear_left_and_cube.png",
                                useSystemCompositorForScreenshot=True)
    def impl_test(self):
        if self.target.systemCompositorControllerSupported:
            ensureHasContentOnSurface(self.rendererLeft, self.firstSurfaceIviId)
            ensureHasContentOnSurface(self.rendererRight, self.secondSurfaceIviId)

            self.rendererLeft.showScene(25)
            self.rendererRight.showScene(26)
            ensureSystemCompositorRoundTrip(self.rendererLeft, self.firstSurfaceIviId)
            self.validateScreenshot(self.rendererLeft, "testClient_multiple_ivi_layers.png", useSystemCompositorForScreenshot=True)

        else:
            log.warning("TestMultipleIVILayers skipped as system compositor controller support is not configured for this target")