Variant:
This example assumes a render stage configuration that consists of two render stage plug-ins—the first in the chain is a transition effect (TFX) engine and the second and final one displays the results on the screen. The TFX render stage does not implement a visuals tree and visuals stores. The configuration matches that shown in the
The TFX render stage creates a TFX surface for its own use—for example, to capture drawing for use in transition effects. It can then introduce parts of the TFX surface into the composition scene as required.
First we will consider what happens when a window slides onto the view from the side.
We will assume that the window does not have an external surface attached. However, it could have semi-transparent pixels and the background scene could have an external surface attached. The transition effect is performed by capturing the window pixels to the TFX surface, and then using composition operations to make the TFX surface (containing the window pixels) slide on from the side. In particular, no updates to the TFX surface or UI surface are required during the transition—everything is done with element updates. The following sequence diagram shows the high-level steps involved in setting up and performing the transition effect.
The main points to note are:
The
The TFX render stage calls
The TFX render stage introduces the TFX surface into the composition scene by calling
The TFX render stage achieves the transition effect by successively updating the element metadata of the TFX surface to move it across the scene.
When the transition effect is finished, the TFX render stage blits the window pixels from the TFX surface into their final position in the UI surface. For semi-transparent windows this must be synchronized with the removal of the TFX surface from the scene—by
Now we will consider what happens when the user switches between two views, A and B. The transition slides A off to one side while B slides on from the other side.
First we will assume that neither A nor B has an external surface. The transition effect is performed in a similar way to the window transition described earlier. The outgoing view is captured into the TFX surface, and introduced as the topmost element into the composition scene. One complication is that on the client side, the outgoing and incoming views may run in different processes. The transition engine must therefore wait for A's exit and B's entry to be signaled before it performs the transition effect.
As in the previous example, the actors are the client application, the Window Server and the two render stages. The system boundary is the Window Server process. Assuming that view A is currently present in the UI surface, the basic flow is as follows:
View A signals the start and end of its exit transition.
View B signals the start of its entry transition.
View B issues new drawing operations to the Window Server.
View B calls
The Window Server lower loop runs.
The Window Server calls
The TFX render stage introduces the TFX surface as the topmost surface in the composition scene, and moves the UI surface off to the side of the scene. It does this by calling
The Window Server lower loop uses
The TFX render stage passes the draw operations straight through to the display render stage, which renders them into the UI surface. However, this is not visible in the composition scene, because it is obscured by the TFX surface.
The Window Server calls
The TFX render stage calls
The client application signals the end of the entry transition and the Window Server scheduler fires.
The Window Server calls
Over a series of frames, the TFX render stage modifies the element metadata to make the TFX surface (containing view A) slide off, and the UI surface (containing view B) slide on. It does this by updating the elements using
When the transition is finished, the TFX render stage removes the TFX surface from composition scene, by calling
Variant:
This example assumes a render stage configuration that consists of two render stage plug-ins—the first in the chain is a transition effect (TFX) engine and the second and final one displays the results on the screen. The TFX render stage does not implement a visuals tree and visuals stores. The configuration matches that shown in the
The TFX render stage creates a TFX surface for its own use—for example, to capture drawing for use in transition effects. It can then introduce parts of the TFX surface into the composition scene as required.
First we will consider what happens when a window slides onto the view from the side.
We will assume that the window does not have an external surface attached. However, it could have semi-transparent pixels and the background scene could have an external surface attached. The transition effect is performed by capturing the window pixels to the TFX surface, and then using composition operations to make the TFX surface (containing the window pixels) slide on from the side. In particular, no updates to the TFX surface or UI surface are required during the transition—everything is done with element updates. The following sequence diagram shows the high-level steps involved in setting up and performing the transition effect.
The main points to note are:
The
The TFX render stage calls
The TFX render stage introduces the TFX surface into the composition scene by calling
The TFX render stage achieves the transition effect by successively updating the element metadata of the TFX surface to move it across the scene.
When the transition effect is finished, the TFX render stage blits the window pixels from the TFX surface into their final position in the UI surface. For semi-transparent windows this must be synchronized with the removal of the TFX surface from the scene—by
Now we will consider what happens when the user switches between two views, A and B. The transition slides A off to one side while B slides on from the other side.
First we will assume that neither A nor B has an external surface. The transition effect is performed in a similar way to the window transition described earlier. The outgoing view is captured into the TFX surface, and introduced as the topmost element into the composition scene. One complication is that on the client side, the outgoing and incoming views may run in different processes. The transition engine must therefore wait for A's exit and B's entry to be signaled before it performs the transition effect.
As in the previous example, the actors are the client application, the Window Server and the two render stages. The system boundary is the Window Server process. Assuming that view A is currently present in the UI surface, the basic flow is as follows:
View A signals the start and end of its exit transition.
View B signals the start of its entry transition.
View B issues new drawing operations to the Window Server.
View B calls
The Window Server lower loop runs.
The Window Server calls
The TFX render stage introduces the TFX surface as the topmost surface in the composition scene, and moves the UI surface off to the side of the scene. It does this by calling
The Window Server lower loop uses
The TFX render stage passes the draw operations straight through to the display render stage, which renders them into the UI surface. However, this is not visible in the composition scene, because it is obscured by the TFX surface.
The Window Server calls
The TFX render stage calls
The client application signals the end of the entry transition and the Window Server scheduler fires.
The Window Server calls
Over a series of frames, the TFX render stage modifies the element metadata to make the TFX surface (containing view A) slide off, and the UI surface (containing view B) slide on. It does this by updating the elements using
When the transition is finished, the TFX render stage removes the TFX surface from composition scene, by calling